我使用 Apache 创建了一个虚拟主机。正常127.0.0.1
或localhost
工作正常,它获得了成功的输出。但在输入虚拟主机的名称时,我收到一条错误消息。
Forbidden
You don't have permission to access / on this server.
这是我的设置:
主办方
127.0.0.1 example.com
127.0.0.1 www.example.com
255.255.255.255 broadcasthost
::1 localhost
httpd配置文件
[...]
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf
[...]
httpd-vhosts.conf
<VirtualHost *:80>
ServerName localhost
DocumentRoot "/Library/WebServer/Documents"
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/Library/Webserver/Documents/example/"
ServerName example.com
ServerAlias www.example.com
ErrorLog "/Library/Webserver/Documents/enetworks/example.com-error_log"
CustomLog "/Library/Webserver/Documents/enetworks/example.com-access_log" common
</VirtualHost>
例如.com-error_log
127.0.0.1:50922] AH01630: client denied by server configuration: /Library/Webserver/Documents/example/
有人能告诉我问题出在哪里吗?谢谢,;)。