• The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Nginx behaving strangely with auth_basic

Dirk

Basic Pleskian
I have the following line in nginx. conf:
location ^~ /internal/ {auth_basic "Restricted"; auth_basic_user_file /var/www/. htpasswd; }

This works well, but the following problem occurs. If I'm in the internal area and now access a php file in the directory, it won't be executed but downloaded. As soon as I comment out the above line, everything works fine again.
Now, if I skip the ^ so that the line looks like this:
location ~ /internal/ {auth_basic "Restricted"; auth_basic_user_file /var/www/. htpasswd; }
Then the php will be executed again, but you can now access individual files directly in the protected directory - so you can't access www.domain.de/internal without password, but you can access www.domain.de/internal/bild1.jpg

Does anyone have an idea how I can protect the entire directory and its contents and still the php runs normally?
 
Back
Top