【发布时间】:2015-08-26 07:44:43
【问题描述】:
我知道,这个问题已经遇到过好几次了,但是看了很多帖子还是不行。有趣的部分:昨天它奏效了。那么,谁能帮我找出错误?一步一步:
我在 Mac OS 10.8.5 上使用 Apache/2.2.29
/etc/hosts
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
127.0.0.1 scripts
127.0.0.1 page
/private/etc/apache2/httpd.conf
[...]
ServerRoot "/usr"
User _www
Group _www
DocumentRoot "/Users/me/server"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
[...]
<Directory "/Users/me/server">
MultiViews
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
[...]
Include /private/etc/apache2/extra/httpd-vhosts.conf
[...]
/private/etc/apache2/extra/httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot "/Users/me/server/scripts"
ServerName scripts
ErrorLog "/Users/me/server/scripts/errlog"
CustomLog "/Users/me/server/scripts/customlog" common
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Users/me/server/page"
ServerName scripts
ErrorLog "/Users/me/server/page/log/errlog"
CustomLog "/Users/me/server/page/log/customlog" common
</VirtualHost>
赋予权利:(测试的全部权利)
/Users/me/server
drwxrwxrwx 5 _www _www
/Users/me/server/page
drwxrwxrwx 4 _www _www
重启apache
sudo apachectl restart
我也试过重启浏览器
日志文件 所有的日志文件都是空的
结果
http://localhost
http://page
它们都不起作用,我不断收到禁止的消息。
【问题讨论】: