NGINX shows 404 for JS and CSS Files

sweatbar

Verified User
Joined
Jul 6, 2019
Messages
33
Hi Guys,

I have configured NGINX as a reverse proxy and now js and css files does not load and shows 404 instead , but the files are there on the server. Any way to resolve this?
 
Likely a permissions problem, make sure /home/user, /home/user/domains are at least chmod 711.
 
No in the error log I can see there are messages saying "access forbidden by rule"
 
It could be .htaccess then. I'd suggest creating support ticket for the case, if you're unable to find the root cause of the issue.
 
It could be .htaccess then. I'd suggest creating support ticket for the case, if you're unable to find the root cause of the issue.
It's working if I comment out this in nginx config

# include /etc/nginx/nginx-modsecurity-enable.conf;

that means i'm disabling modsecurity right?
 
Yes, it means you're likely hitting a modsecurity rule then. Consider switching the ruleset to an alternative one then, or disabling that specific rule.
 
Back
Top