Symptoms
-
With disabled option Serve static files by nginx website(s) or javascript (.js) files (In the Browser console) intermittently show either of the following errors:
403 Forbidden
404 Not Found
-
The document root for the website was recently changed at Plesk > Domains > example.com > Hosting Settings to another location, for example, to
httpdocs/public
-
The following error can be observed in the domain’s log file
/var/www/vhosts/example.com/logs/error_log
:AH01276: Cannot serve directory /var/www/vhosts/example.com/httpdocs/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm,index.shtml) found, and server-generated directory index forbidden by Options directive
Cause
The webserver tries to parse the incorrect (old) document root due to stuck Apache processes.
This is Apache bug #63169
Resolution
-
Connect to the server via SSH;
-
Restart Apache service:
-
For Debian/Ubuntu:
# systemctl restart apache2
-
For RHEL/CentOS:
# systemctl restart httpd
-