• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Resolved nginx and access static files after authentification

L. Hagen

Basic Pleskian
Hello,

I discovered a new problem with nginx and hope again, that somebody of you can give me a help.
Background:
  • nginx as proxy for apache (Plesk Odin & Umbuto)
  • a password restricted area /admin
  • a directory with a huge amount of photos /photo
  • directory permissions are set to 755 und files to 644
When using the website as a normal visitor I can access (<img> or <a>) the images in /photo. But when I entered the restricted user area and have been successfully logged in I get a 403 Permission denied. I'm totally confused now. Does anybody has an idea (or much better a solution), please?

thank you and best regards,
Lars
 
Hi L. Hagen,

are you aware, that NGINX as well as APACHE use for example:

Apache:
Code:
        <Directory "/var/www/vhosts/YOUR-DOMAIN.COM/httpdocs/YOUR-SECURED-FOLDER">
            AuthType Basic
            AuthName "Secure Login"
            AuthUserFile "/var/www/vhosts/system/YOUR-DOMAIN.COM/pd/d..httpdocs"
            require valid-user
        </Directory>

NGINX:
Code:
    location ~ ^/YOUR-SECURED-FOLDER {
        auth_basic "Secure Login";
        auth_basic_user_file "/var/www/vhosts/system/YOUR-DOMAIN.COM/pd/d..httpdocs";

        location ~ \.php(/.*)?$ {
            fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
            fastcgi_param PATH_INFO $fastcgi_path_info;
            fastcgi_pass "unix:///var/www/vhosts/system/YOUR-DOMAIN.COM/php-fpm.sock";
            include /etc/nginx/fastcgi.conf;
        }

Plesk offers the possibilty to add needed modifications in your webserver configuration files for "Password-Protected Directories" at:

=> HOME > Domains > YOUR-DOMAIN.COM > Password-Protected Directories​

Consider to use the Plesk feature, to avoid misconfigurations in your webserver configuration files. ;)
 
Hi UFHH01,

sorry for my late response but thank you for your help! Today I noticed that I was a bit stupid, becuase I had some old .htaccess rules active, that worked on http:// but at the same time I switched to nginx on my live system I changed my system to "https://". So the access was forbidden... DAMN :)

best regards,
Lars
 
Back
Top