Jaspreet Singh
Jaspreet Singh

Reputation: 321

403 Forbidden Error. Hosting a website on my PC with WAMP?

I'm running Windows 7 Ultimate 64-Bit and have WAMP installed, nothing configured though. I'm using dynamic IP address. I have some web files that i want to host temporarily on my PC so that others can access it.

After turning all the services on and putting the server online, i get "Forbidden You don't have permission to access / on this server" when i type the external IP address of my machine. though it works with "localhost" and "127.0.0.1" rightly points to the www folder. Port 80 is opened and Windows firewall is disabled.

What is the problem? Where does my external IP address points on the server and how can i change it to the desired directory?

Upvotes: 0

Views: 10264

Answers (2)

Aniruddh
Aniruddh

Reputation: 1

After replacement of

Order Deny,Allow
Deny from all
Allow from 127.0.0.1

with this

AllowOverride None
Allow from all

restart all services and make sure that you have put in online(left click on wamp icon and last option put online).

It's solved my 403 forbidden error.

Upvotes: 0

RiggsFolly
RiggsFolly

Reputation: 94662

First, check that the 'Put Online' worked properly, it may not have, if you have manually altered the default state of this section of httpd.conf file.

look at httpd.conf, when it is set ONLINE and it should say :-

For Apache versions 2.2.x

#   onlineoffline tag - don't remove
    Order Allow,Deny
    Allow from all

For Apache versions 2.4.x

#   onlineoffline tag - don't remove
    Require all granted

Change it manually if it does not.

Also if you have setup vhosts check the definition you created for ServerName localhost and make sure that is also set the same.

PS. While quick and easy this does open your whole WAMP Apache server up to access from external address's. It would be better to create a VHOST for your site so you can allow access to that from anywhere but keep the basic WAMP area safe and accessible from only localhost.

When you say you are entering the external IP Address of your machine, if you mean the WAN ip address i.e. the routers external address, most home routers do not allow loop back which would be required to make that work. So try accessing it from your smart phone ( while not connected to your router) or go to a friends and try it from there that will be your only accurate test of whether your config is working.

Upvotes: 7

Related Questions