localhost/phpmyadmin 403 error

Hi all,

New to this forum so nice to meet you all.

I am having a very strange problem and I am hoping that someone can help with it.

When I access the phpMyAdmin page through the following URL: http://localhost/phpmyadmin/, I get a
Code:
403 Forbidden Error: Forbidden  You don't have permission to access /phpmyadmin/ on this server.

However when I access the phpMyAdmin page through the URL: http://127.0.0.1/phpmyadmin/, the page loads as it should.

I am really baffled here.

Any ideas or solutions greatly welcomed.

Cheers,

Fergal
 
concrete said:
Any one any suggestions?

In the default configuration localhost is the domain-name for 127.0.0.1. This is usually defined in /etc/hosts.

So, I would start troubleshooting by verifying whether localhost is really forward resolved to 127.0.0.1.

# host localhost
Code:
localhost has address 127.0.0.1
localhost has IPv6 address ::1
... and that needs to be also reversely resolved to localhost.
# host 127.0.0.1
Code:
1.0.0.127.in-addr.arpa domain name pointer localhost.

If on your system localhost is really 127.0.0.1, then I would carefully check the <VirtualHost> configurations of apache. Mis-configuration might be found in the main configuration file /usr/local/etc/apache22/httpd.conf, in any include file, and in any .htaccess file in the path of phpmyadmin.
 
It was my mistake somehow,, having 2 ]nginx.conf files ( /usr/local/etc/nginx.conf - /usr/local/etc/nginx/nginx.conf ) I did edit the first file, no wonder the problem still exist. But then I edit the 2nd file and everything work fine.
 
Remove that /usr/local/etc/nginx.conf file, it's not used and will only lead to confusion.
 
Back
Top