All localhost pages via WAMP blocked?

后端 未结 8 2449
北恋
北恋 2020-12-15 08:15

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

相关标签:
8条回答
  • 2020-12-15 08:54

    Simple solutions. Just Run as Administrator the Wamp Installations file and they will works like a charm :)

    0 讨论(0)
  • 2020-12-15 08:57

    It can be an ipv6 issue. So in your httpd.conf add your ipv6 local address:

    Change:

    Allow from 127.0.0.1
    

    to:

    Allow from 127.0.0.1
    Allow from ::1:
    
    0 讨论(0)
  • 2020-12-15 09:01

    Your "Deny From All" is what's causing the 403 error. The setup you post is used to prevent all traffic, with the intention of later allowing specific traffic. If you never allow specific traffic, you'll never get it to work.

    With your 404 error, ensure you're using the right path and there's no errors in your apache error log.

    http://httpd.apache.org/docs/current/mod/core.html#directory

    0 讨论(0)
  • 2020-12-15 09:02

    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>
    
    0 讨论(0)
  • 2020-12-15 09:02

    Marco Tamanti solution worked for me:

    Allow from 127.0.0.1
    Allow from ::1:
    

    so I have:

    <Directory "c:/wamp/www/">
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
    Allow from ::1:
    </Directory>
    
    0 讨论(0)
  • 2020-12-15 09:03

    Try changing the line in httpd.conf

    Allow from 127.0.0.1 
    

    or

     Allow from all
    

    Refer to the documentation

    0 讨论(0)
提交回复
热议问题