[Solved] Access forbidden! New XAMPP security concept. Error 403

After fresh installation of XAMMP (LAMPP) you get this 403 error when accessing phpMyAdmin using browser.

phpmyadmin xampp 403 forbidden

It is due to new security rule according to which access to the requested directory is only available from the local network. So here are the step-by-step solution:

Note: (All file location are under assumption that lampp installation directory exists under opt directory, if you have lampp installed elsewhere, change it according wise)

1. Open the httpd-xampp.conf file at the location /opt/lampp/etc/extra/httpd-xampp.conf using a text editor (nano here) after going root in the terminal:

open httpd conf xampp

2. Search for the text #New XAMPP security concept and beneath that find the line Deny from all. 

deny from all

3. Replace the word Deny with Allow so that it becomes Allow from all :

Allow from all

4. Now search the text <Directory “/opt/lampp/phpmyadmin> and between this opening tag line and its closing tag line </Directory>, add the line Require all granted and save(overwrite) the file.

require all grantedTo save the file in nano text editor use command: Ctrl+O followed by Enter. Give command Ctrl+X to exit from the text editor and come back to the terminal.

5. Now restart the XAMPP (LAMPP) using this command:

/opt/lampp/lampp restart

restart xampp lampp

6. Now point your browser to http://localhost/phpmyadmin and test whether you did it right or not. (Yes we did it right! :-) )

phpMyAdmin

Leave a Reply

Your email address will not be published. Required fields are marked *