• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Adding Directory Password Protection Make Resources To Become Not Found

sam.kh

New Pleskian
I am new to this forum (so my apologies if I am not asking this in the right place.) I searched in the forum and couldn't find any thread with the similar issue. Our site is hosted on Plesk Onyx 17.8.11 CentOS Linux 7.6.1810 (Core)‬ when we add password protection to any directory, after we navigate to that directory and logging in with the username/password none of the resources needed to correctly show the page under that directory come up. Console shows many 404 errors for all images, styles files, js files, we only see text on the page. When we remove the password protection the directory works fine and the page loads correctly with all the resources working.
 
Last edited:
Just to provide more details, we get not found error for all resources files even if we set their permissions to 777 (when the password protection is enabled.) Another piece of info is that only one domain has this issue (the main domain). For the other domains on the same plesk account when we add password protection to them they work without any problem.
 
Last edited:
Just to provide more details, we get not found error for all resources files even if we set their permissions to 777 (when the password protection is enabled.) Another piece of info is that only one domain has this issue (the main domain). For the other domains on the same plesk account when we add password protection to them they work without any problem.
Hello. Could you please provide more info about your domain configuration? Do you use apache or nginx? Do you use nginx proxy, cache and static files serving? Any specific nginx directives?
 
Hello. Could you please provide more info about your domain configuration? Do you use apache or nginx? Do you use nginx proxy, cache and static files serving? Any specific nginx directives?

Thanks, yes, I am using FPM application served by Apache. Under Apache & nginx Settings everything is as default.

Proxy mode: Enabled
Smart static files processing: Enabled
Serve static files directly by nginx: Disabled
Enable nginx caching: Disabled

I only have these additional nginx directives. Which I have on another domain too that has no issues with password protection.

gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml;
gzip_vary on;

location ~* \.(jpg|jpeg|png|gif|ico|css|js|txt)$ {
expires 7d;
}
 
Back
Top