Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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.

EDIT3: The contents of my httpd.conf: http://www.mediafire.com/?p54a53443efkefs

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
336 views
Welcome To Ask or Share your Answers For Others

1 Answer

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>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...