开发者

127.0.0.1 works, localhost not - VH - Zend Ce, Mac

I am having weired problem, after adding my virtual host conf entry localhost is not working (getting forbiden 403) but 127.0.0.1 does (all accessed via browser - http), here you have my conf:

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "/MyData/__www/default"
ServerName localhost
<Location />
开发者_开发百科        Order deny,allow
        Deny from All   
        Allow from 127.0.0.1
        Options +FollowSymLinks -Indexes            
</Location>
</VirtualHost>

The funny thing is that when I change allow from to:

 Allow from localhost

localhost works but 127.0.0.1 not, localhost is mapped properly in hosts file.

please help,

cheers, /Marcin


This works:

127.0.0.1, ::1
          ^_______A space is needed before "::"


On some systems, localhost maps to an IPv6 address, ::1. Try:

Allow from 127.0.0.1,::1
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜