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

Categories

0 votes
361 views
in Technique[技术] by (71.8m points)

php - 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.

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

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

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>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...