You don’t have permission to access /wp-admin/ on this server.
If you are facing CWP Free version and have mod_security turned on, then you probably need to disable one of if its rules that generate false positive. I’ve tested this on CMS other than WordPress so if you are using any other CMS like Joomla, Magento or OpenCart, etc it might be worth trying.
Be advised that this tutorial is for only those who are using the following:
- CentOS WebPanel (CWP)
- Mod Security (Turned On)
- Receiving Forbidden Errors while accessing your website
First Off, try restarting CWP Services. It might fix the issue. There are multiple ways to do that, but I’m going to mention two:
service cwpsrv restartusing SSH
- Navigate to CWP Dashboard and scroll down to the Process section. Click on Restart CWP Services
If restarting CWP Services doesn’t help, try this solution:
- Navigate to Security > Mod Security
- In the Info Panel on the right, scroll down and look for Configuration Files.
- Click on Disable Rules and a file
will be loaded in the left pane.
- Add these lines at the end of the file:
- and then Click Save
- After saving the file click on Restart Apache in the Info Panel on the Right
Voila! the forbidden error is now gone.
If you are still facing issues and the above guide didn’t help, you can either drop a comment or open a ticket to ask me for help.