Articles in this section

Static files in Plesk protected directory are inaccessible: ERROR: 404 not found

kb: bug kb: fixed Plesk for Linux

Symptoms

  • When accessing static files (JS, images CSS) contained in a Protected directory or its subdirectories in Plesk, the following error is shown:

    CONFIG_TEXT: ERROR: 404 not found

  • Error code 500 may also be displayed

  • Proxy Mode is enabled in Domains > example.com > Hosting & DNS tab > Apache & nginx Settings.
  • Smart Static Files Processing is enabled in Domains > example.com > Hosting & DNS tab > Apache & nginx Settings

Cause

Product issue:

  • #PPPM-13942 "It is now possible to access files in password-protected directories when "Smart static files processing" and "Proxy mode" are enabled in the "Apache & nginx" settings."
    Fixed in:

Resolution

Please consider updating your server:

In case the issue persists after the update, please also check for custom nginx configuration templates, as the fix is only applied to the default templates.

If affected, you may add a ^~ to the custom template at 

/usr/local/psa/admin/conf/templates/default/domain/nginxDomainVirtualHost.php

specifically at the internal-nginx-static-location directive like so:

    location ^~ /internal-nginx-static-location/ {

Workaround

If update is not possible for some reason you may try the following

workaround

1. Log into Plesk.

2. Go to Domains > example.com > Hosting & DNS tab > Apache & nginx Settings.

3. Disable Smart static files processing or enable Serve static files directly by nginx.

Note: when enabling Serve static files directly by nginx, mod_rewrite rules will not be applied

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.