(SOLVED) 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

 

Access Forbidden 403 ( New XAMPP security concept )

Access Forbidden 403 ( New XAMPP security concept )

Yuck! during development and seeing unforced/unwanted errors… after all a few mins R&D and research , 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

References :

1- https://community.apachefriends.org/f/viewtopic.php?f=17&t=37286

2- http://tutorialsea.com/kb/linux-tutorial/access-forbidden-new-xampp-security-concept-error-403/

3- https://bbs.archlinux.org/viewtopic.php?id=148165

i found link #02 and #03 pretty useful.

Advertisements

6 thoughts on “(SOLVED) XAMPP – Access Forbidden 403 Error – Windows

  1. Jeevan Ale July 10, 2014 at 12:00 pm Reply

    Thank you.. It works…

  2. Geek Boy January 22, 2015 at 5:56 am Reply

    On windows this worked for me:
    YourDrive:/xampp/apache/conf/extra/httpd-xampp.conf

    Find this :

    # Close XAMPP sites here

    Comment this line : Allow from ::1 127.0.0.0/8 by adding a # sign (#Allow from ::1 127.0.0.0/8 )

    Add this line below : Allow from all

    Must restart you Apache from control panel.

    Thanks

  3. tushar Jamdhade January 23, 2016 at 11:50 am Reply

    It works for me.

    Thanks.

  4. Mahamadali June 2, 2016 at 3:33 am Reply

    Thank you so much it works !

  5. Lilith October 18, 2016 at 11:01 am Reply

    I tried both things to change, but it still shows me error 403… what should I do ?

  6. Anwaar Ali Khan November 27, 2016 at 7:05 pm Reply

    can you share error, or log? and which OS are you using.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: