Wamp Cannot Access on Local Network 403 Forbidden

WAMP Cannot access on local network 403 Forbidden


If you are using WAMPServer 3 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 not a 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.

Sample Image

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>

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

403 Forbidden - WAMP Server 2.5

WAMPServer is configured to be a single seat developer tool for the AMP stack on a windows system.

As such and for the security of the complete beginner, WAMPServers Apache is configured to only accept connections from the PC that is running the Apache service.

If you want to connect to Apache from an IP other than that of the PC running WAMPServer, like your phone or another PC on your local network, you have to tell Apache that is allowed.

The simple solution for this is to use the wampmanager menus system :-

wampmanager -> Put Online

This will change the httpd.conf file from

#   onlineoffline tag - don't remove
Require local

To

#   onlineoffline tag - don't remove
Require all granted

Thus allowing any ip address in the universe to connect to your Apache web server. If you are sure that there is no external access to your local network this is reasonable solution.

If however you think that now or at some future time your network may allow access over port 80 from an external source, I prefer to be a little more specific when I change this parameter. So if you prefer you can

Edit the httpd.conf file, use the wampmanager menus to do this

wampmanager -> Apache -> httpd.conf

Then change this

#   onlineoffline tag - don't remove
Require local

To

#   onlineoffline tag - don't remove
Require local
Require ip 192.168.1

assuming that your local subnet starts with those 3 quartiles and that your phone is connected to your router via WiFi.

If your phone is using your suppliers network i.e. not your WiFi this will not work and you will have to Port Forward your router, but thats another question.

WampServer HTTP 403 Forbidden

Check your Apache.

Edit the htpd.conf file. In there is some syntax that tells Apache what locations ( ip address's ) it is allowed to accept connections from.

As its designed to be a development system, by default this is set to only allow acess from the PC running WAMP(Apache) i.e. localhost 127.0.0.1 and maybe ::1 depending on the version you are using.

So edit the httpd.conf file ( using the wampmanager menus )

wampmanager -> Apache -> httpd.conf

Find this section

<Directory "c:/wamp/www/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None

#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 localhost
</Directory>

You will now need to add the IP or IP's of the machines accessing your Apache web server. Do it like this

#   onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 localhost ::1
Allow from 172.20.1.74
# Or you could allow any ip on a subnet by using just the forst 3 quartiles
# Allow from 172.20.1

If you are using APache 2.4, the syntax changed for this so yo ushould use

#   onlineoffline tag - don't remove
# the equivalent of 127.0.0.1 localhost ::1
Require local
# allowing by IP
Require ip 172.20.1.74
# or for the whole subnet
Require ip 172.20.1

Please avoid any suggestions to use Allow from all I am sure the school does not want you opening another attack vector on their network.

WAMP & Vhosts. Access from internet = 403 Forbidden

About the 403 error you should add : Require all granted for your directories.

About the 2 servers availables, you can add for example another port like :

Listen 80
Listen 81
<VirtualHost *:80>
DocumentRoot "E:\Users\Rix\Google Drive\Documents\Biz\Progetti\wordpress"
ServerName localhost
<Directory "E:\Users\Rix\Google Drive\Documents\Biz\Progetti\wordpress">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost *:81>
DocumentRoot "E:\Users\Rix\Offline Drive\Web Ghianda\Wordpress"
ServerName ghiandalocal
<Directory "E:\Users\Rix\Offline Drive\Web Ghianda\Wordpress">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Hope it helps you

WAMP 403 Forbidden message on Windows 7

The access to your Apache server is forbidden from addresses other than 127.0.0.1 in httpd.conf (Apache's config file) :

<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>

The same goes for your PHPMyAdmin access, the config file is phpmyadmin.conf :

<Directory "c:/wamp/apps/phpmyadmin3.4.5/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>

You can set them to allow connections from all IP addresses like follows :

AllowOverride All
Order allow,deny
Allow from all

WAMP server error 403 Forbidden

If your original httpd.conf has the Require syntax then it is Apache 2.4

The Allow from all is Apache 2.2 syntax. Its best NOT to mix them up within the same httpd.conf file

If you really want to allow any ip in the universe to use your web site and you are running Apache 2.4 then us

Require all granted

Alternativeley if you just want to be able to get to your web server from your local network something like this is safer

Require ip 192.168.1

Note: use of only 3 of the 4 quartiles, gives access to any ip that starts 192.168.1 i.e any ip on the local network subnet

Documetation for Apache mod_authx_code can be found here

Wampserver 3.0.6 64bit - 403 Forbidden

Seems if you have an already made virtual host file, the put online menu item does not issue the necessary changes to it.
In the vhosts file Changing Require local to Require all granted fixed the issue.
Strange....

# Virtual Hosts
#

<VirtualHost *:80>
ServerName localhost
DocumentRoot F:/wamp64/www
<Directory "F:/wamp64/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
#


Related Topics



Leave a reply



Submit