WAMPSERVER Cannot Access On Local Network 403 Forbidden

WAMPSERVER

WAMPSERVER Cannot Access On Local Network 403 Forbidden 

Setup wampserver access from another computer, If you are using WAMPServer 3.0 See bottom of answer

For WAMPServer versions <= 2.5

By default Wampserver comes configured as securely as it can, so Apache is set to only allow access from the machine running wamp. Afterall it is supposed to be a development server and nota live server.
Also there was a little error released with WAMPServer 2.4 where it used the old Apache 2.2 syntax instead of the new Apache 2.4 syntax for access rights.
You need to change the security setting on Apache to allow access from anywhere else, so edit your httpd.conf file.
Change this section from :
#   onlineoffline tag - don't remove
     Order Deny,Allow
     Deny from all
     Allow from 127.0.0.1
     Allow from ::1
     Allow from localhost
To :
#   onlineoffline tag - don't remove
    Require local
    Require ip 192.168.0
The Require local allows access from these ip's 127.0.0.1 & localhost & ::1.
The statement Require ip 192.168.0 will allow you to access the Apache server from any ip on your internal network. Also it will allow access using the server mechines actual ip address from the server machine, as you are trying to do.

WAMPServer 3 has a different method

In version 3 and > of WAMPServer there is a Virtual Hosts pre defined for localhost so you have to make the access privilage amendements in the Virtual Host definition config file
First dont amend the httpd.conf file at all, leave it as you found it.
Using the menus, edit the httpd-vhosts.conf file.
WAMPSERVER Cannot access on local network 403 Forbidden
WAMPSERVER

It should look like this :
<VirtualHost *:80>
    ServerName localhost
    DocumentRoot D:/wamp/www
    <Directory  "D:/wamp/www/">
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>
Amend it to
<VirtualHost *:80>
    ServerName localhost
    DocumentRoot D:/wamp/www
    <Directory  "D:/wamp/www/">
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>
or

<VirtualHost *:80>
 ServerName localhost
 DocumentRoot D:/wamp/www
 <Directory "D:/wamp/www/">
 Options Indexes FollowSymLinks MultiViews
 AllowOverride All
 Require local
 Require ip 192.168.0
 </Directory>
</VirtualHost>
Hopefully you will have created a Virtual Host for your project and not be using the wamp\www folder for your site. In that case leave the localhost definition alone and make the change only to your Virtual Host.
Dont forget to restart Apache after making this change

Post a Comment

0 Comments