Skip to content


XAMPP – Access Forbidden 403 Error – Windows

 

Recently i was working on my new android application, got to make it connected to mysql database, so i started XAMPP along MYSQL , wrote some php code to test the connection … but was stucked with error!

Access forbidden! New XAMPP security concept. Error 403

I got a solution at two different websites … but individually they were bit incomplete and on combining both solutions , i got the issue resolved.

Open httpd-vhosts.conf file and in the bottom of the file change it

<VirtualHost *:80>
DocumentRoot “E:/xampp/htdocs/”
ServerName localhost
<Directory E:/xampp/htdocs/>.
Require all granted
</Directory>
</VirtualHost>

Here E:/xampp is my project workspace, you can change it as per your settings and Second Change is

Now Open httpd-xampp.conf file and in the bottom of the file change it

#
# New XAMPP security concept
#
<LocationMatch “^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))”>
Order deny,allow
Allow from all
Allow from ::1 127.0.0.0/8
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

NOTE : Make sure u  backup files ( httpd-xampp.conf ) and ( httpd-vhosts.conf ) , Both Files are located in Drive:\xampp\apache\conf\extra

Posted in Android, Apache Web Server, Php. Tagged with , , .