The XAMPP Access Forbidden Error 403: Toggling on/off

Posted by admin at June 24, 2019

Accessing an XAMPP box from another computer throws a 403 Access Forbidden error. Certain situations require sharing access to a developmental platform with computer in the same LAN. From experience, these situations mostly involve working with bad internet connections while making a software presentation. I can grant limited access of a locally-hosted version to the participants.

However, trying to open the PC’s IP address on the foreign machine throws an “Access Forbidden Error 403”. Instructions below show how to toggle the error on and off. It goes without saying, that the Error page should be left activated by default and should be deactivated for a limited period of time.

1. Locate the file “httpd-xampp.conf” (\Applications\XAMPP\xamppfiles\etc\extra\httpd-xampp.conf on the MAC)

2. Locate the lines:

<Directory "/Applications/XAMPP/xamppfiles/htdocs">
AllowOverride AuthConfig Limit
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

3. Notice that the Directory tag opens with an address “/Applications/XAMPP/xamppfiles/htdocs”. This is the location where all your application files are stored. Therefore the lines above open this folder for web access to the public on the same network.

4. To deactivate the 403 page and grant public access, set the line “Require local” to “Require all granted”. Set the line to “Require local” to activate.




Suggested Read