Search code examples
phphtmlwampfirewallwindows-firewall

All localhost pages via WAMP blocked?


I've been trying to fix a weird 403 Forbidden error I get when I try to go to one of my pages via WAMP on the localhost.

After adding a rule to open up port 80 via Windows Firewall, which apache uses, I notice that this does NOT fix my problem and instead gives me a 403 forbidden for ALL my pages via localhost.

Removing the rule I just made (which caused this to begin with) does not fix it. Disabling Windows Firewall does not fix it. Restarting my computer does not fix it. Any ideas?

EDIT2: I AM able to go to localhost/phpmyadmin for whatever that's worth.


Solution

  • In httpd.conf, find the following sections and ensure they are correct:

    DocumentRoot "C:/wamp/www"

    <Directory />
        Options None
        AllowOverride None
        Order deny,allow
        Deny from all
    </Directory>
    
    <Directory C:/wamp/www>
        Options None
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    

    Those are the settings that I am using in my install and they work fine. Make sure you restart Apache if you make any changes.

    If you continue having issues, please update your original question with your httpd.conf.


    Edit:

    This is kludgey and I'm just grasping at straws here, but try adding a new entry to your vhosts:

    <VirtualHost *:80>
        DocumentRoot "C:/wamp/www"
        ServerName localhost
    </VirtualHost>