Thursday, October 18, 2012

XAMPP phpmyadmin access forbidden

XAMPP is a great tool for web application development and testing.  It provides a self-contained environment for running web applications.

It has been a while since I have used it, and the new edition seems to have enhanced the default security.  For instance, if you run phpmyadmin on a fresh install, you will be greeted with ACCESS FORBIDDEN error.  I had anyway.  To overcome this (and my circumvents the security), I have done the below:

1) Open the /opt/lampp/etc/extra/httpd-xampp.conf with your choice of text editor
2) Update the two sections below as shown, then restart lampp.  You should be all set!

<directory lampp="lampp" opt="opt" phpmyadmin="phpmyadmin">
    AllowOverride AuthConfig Limit
Require all granted
</directory>

<LocationMatch "^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))">
        Order allow,deny
        Allow from all

        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</locationmatch>

No comments: