ModSecurity blocking random js files on mobile view
Hi everyone,
I am facing a strange issue with my cPanel hosting account. Everything looks fine on desktop, but when visitors browse the site on mobile, some javascript files are getting blocked with a 403 Forbidden error.
I checked my cPanel Error Logs and I think it is a ModSecurity rule triggering, but I can't find the exact ID to whitelist it.
You can see the problem live here using a smartphone browser: REDACTED
Is there an easy way in cPanel to find which specific rule is blocking these mobile assets without turning off ModSecurity completely?
Thanks for your help!
-
find out what your IP address is on your mobile device (whatsmyip.org , ipchicken.com). then browse the site with your mobile device. Then grep /usr/local/apache/logs/error_log for that IP address.
If you aren't the admin of the server (no root access), then do the same as instructed above, except log into your cPanel account, navigate to Metrics --> Errors
Look for your IP address in that log and see what it says.
Depending upon how active your site is, you might have to do this all quickly -- be logged into cPanel, browse the site with your mobile device, hurry up and go look for your IP in the Metrics --> Errors section.
1 -
Thanks for the tip! I don't have root access on this server, so I will try the cPanel Metrics -> Errors method you mentioned.
Checking the mobile IP first makes total sense, I didn't think about that. I'll try to do it right now and look for the IP.
Appreciate the help!2
Please sign in to leave a comment.
Comments
2 comments