WAMP Cannot Access on Local Network 403 Forbidden
Access issues to WAMP servers on a local network can be frustrating, especially when using the server's IP address instead of localhost. Follow this comprehensive guide to resolve the 403 Forbidden error when attempting to access your WAMP server from another computer.
For WAMPServer Versions <= 2.5:
By default, WAMPServer restricts access to the server from the local machine only. To enable access from other devices on the network, modify the httpd.conf file located in your WAMPServer installation directory.
# onlineoffline tag - don't remove Order Deny,Allow Deny from all Allow from 127.0.0.1 Allow from ::1 Allow from localhost
# onlineoffline tag - don't remove Require local Require ip 192.168.0
The Require local statement allows access from local IP addresses, including 127.0.0.1 and localhost. The Require ip 192.168.0 statement allows access from any IP address within the 192.168.0 network. Adjust the IP address range as needed for your network configuration.
For WAMPServer 3 and Above:
With WAMPServer version 3 and above, a different approach is required.
<VirtualHost *:80> ServerName localhost DocumentRoot D:/wamp/www <Directory "D:/wamp/www/"> Options +Indexes +FollowSymLinks +MultiViews AllowOverride All Require local </Directory> </VirtualHost><ol start="3"><li>Replace the Require local line with Require all granted:</li></ol> <pre class="brush:php;toolbar:false"><VirtualHost *:80> ServerName localhost DocumentRoot D:/wamp/www <Directory "D:/wamp/www/"> Options +Indexes +FollowSymLinks +MultiViews AllowOverride All Require all granted </Directory> </VirtualHost>
Additional Troubleshooting Tips:
The above is the detailed content of Why Am I Getting a 403 Forbidden Error When Accessing My WAMP Server on My Local Network?. For more information, please follow other related articles on the PHP Chinese website!