[Solved] - phpmyadmin 403 forbidden with apache2 https

Posted 2 years ago

A Problem I faced when adding my SSL certificate was I didn’t check whether phpmyadmin was working. I figured out what was going on by working my way back through the rabbit hole.

Firstly, when you see the 403, forbidden error. Run the following command

tail -20 /path/to/your/error-logs

I noticed I was getting the following error, AH01797: client denied by server configuration

Solving AH01797: client denied by server configuration

There was clearly a miss configuration somewhere so I needed to check what sites are enabled on apache,run this command

apache2ctl -S

NOTE: This may vary on your system, see here

From there I could see the file I needed to edit, it looked similar to below


Open the above file with your editor, I use vi.

vi /etc/apache2/sites-enabled/domain.com-le-ssl.conf

Check to see if you have a configuration in there for /phpmyadmin

<Directory "/usr/share/phpmyadmin">
    AllowOverride None
    Options None
    Require all denied

NOTE: Change, denied to granted to allow permission, you should then go about securing your admin

Restart apache

service apache2 restart