Forbidden: You don’t have permission to access / on this server, WAMP Error

print
please ensure these 3 things

1.

first of all Port 80 and 443 must be allow for both TCP and UDP packets. To do this, create 2 inbound rules for TPC and UDP on Windows Firewall for port 80 and 443. (or you can disable your whole firewall for testing but permanent solution if allow inbound rule)

2.

If you are using WAMPServer 3 See bottom of answer

For WAMPServer versions <= 2.5

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
    Order Allow,Deny
      Allow from all

if “Allow from all” line not work for your then use “Require all granted” then it will work for you.

WAMPServer 3 has a different method

In version 3 and > of WAMPServer there is a Virtual Hosts pre defined for localhost so dont amend the httpd.conf file at all, leave it as you found it.

Using the menus, edit the httpd-vhosts.conf file.

enter image description here

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.

3. Dont forget to restart All Services of Wamp or Apache after making this change

 

 

https://www.simonewebdesign.it/how-to-put-online-your-wampserver/

Configuring the server to be reachable by everyone

The last step! Open your httpd.conf and find this line:

ServerName localhost:80

Change it to:

ServerName <your private IP>:80

Example:

ServerName 192.168.1.27:80

Just a quick note: you can jump over the step below. It can be done in an easier way by just clicking on the greenWampServer tray icon and choosing “Put Online”.

Also find this line:

#   onlineoffline tag - don't remove
    Require local

Change it to:

#   onlineoffline tag - don't remove
    Require all granted

In older versions of Apache, the line would look like:

Order Deny,Allow
Deny from all
Allow from 127.0.0.1

And you need to change it to:

Order Allow,Deny
Allow from all

Restart your web server. Now just find out what’s your current public IP address and try to go to:

http://<public IP address>:<port>/

i.e.:

http://13.37.223.21:8080/

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.