NGINX shows 404 for JS and CSS Files

sweatbar

Verified User
Joined
Jul 6, 2019
Messages
8
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?
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,774
Location
LT, EU
Likely a permissions problem, make sure /home/user, /home/user/domains are at least chmod 711.
 

sweatbar

Verified User
Joined
Jul 6, 2019
Messages
8
No in the error log I can see there are messages saying "access forbidden by rule"
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,774
Location
LT, EU
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.
 

sweatbar

Verified User
Joined
Jul 6, 2019
Messages
8
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?
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,774
Location
LT, EU
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.
 
Top