Home > Net >  After changing httpd-xampp file to read allow for 127.0.0.1 I was forbidden access to phpmyadmin
After changing httpd-xampp file to read allow for 127.0.0.1 I was forbidden access to phpmyadmin

Time:08-28

Running a website using XAMPP and setting up security for phpmyadmin and mySQL when I added the following authorization for access to phpmyadmin:

Alias /phpmyadmin "D:/XAMP/phpMyAdmin/" <Directory "D:/XAMP/phpMyAdmin"> AllowOverride AuthConfig Order allow,deny Allow from 127.0.0.1

But now my own machine can't connect to phpmyadmin and I receive Forbidden message!

CodePudding user response:

It could be because that the Apache version your localhost running is updated and the Apache configuration your using might be outdated.

Earlier as in your configuration, the access control based on client host name, IP address, and other characteristics of client requests was done using the directives Order, Allow, Deny, and Satisfy.

But now, such access control is done in the same way as other authorization checks, using the new module mod_authz_host. The old access control idioms should be replaced by the new authentication mechanisms, although for compatibility with old configurations, the new module mod_access_compat is provided.

Replace

Order allow,deny
Allow from 127.0.0.1

With

Require local

The local provider allows access to the server if any of the following conditions is true:

  • The client address matches 127.0.0.0/8

  • The client address is ::1

  • Both the client and the server address of the connection are the same

  • Related