• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Password Protecting Sites with Nginx and PHP-FPM

ScottGoddard

Basic Pleskian
I am seeing some some some strange behaviour when password protecting directories served by nginx and PHP-FPM.

If I have a site set up so that 'Process PHP by nginx' is selected under ('Websites & Domains>Web Server Settings>nginx settings') and set up password protection ('Websites & Domains>Password-Protected Directories') PHP pages are still served without asking for a password.

If I untick 'Process PHP by nginx' the behaviour returns to normal and an attempt to any access files results in the password request.

Is this behaviour by design? If so, it is not made clear when you set up the password protection that it will not apply to PHP pages if you have nginx process the PHP pages.

OS: CentOS 6.6 (Final)
Plesk version: 12.0.18 Update #51

Obviously I can work around this for now but would appreciate any assistance. I have done a search on here and the Knowledge Base but could not find any similar issues
 
Last edited:
Does anyone know if this behaviour is correct? It seems like protecting access to folders using 'Websites & Domains>Password-Protected Directories' does not work for any files served by nginx?

Any help?
 
Update: By deleting and recreating the password protection and the username/password in 'Websites & Domains>Password-Protected Directories' it is now working as expected for all sub folders. However, I cannot get password protection to work at all, on the sites root directory when files are processed via nginx.

Does anyone else have this problem, or is it just me?
 
Back
Top