帮助设置虚拟主机。在/etc/apache2/httpd.conf
文件中,我在此处取消注释了这一行:
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf
接下来,该文件被打开,最后订购了一个新的虚拟主机:
<VirtualHost *:80>
ServerName localhost
DocumentRoot "/Library/WebServer/Documents/"
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot "/Users/igor/sites/advanced"
ServerName advanced
ErrorLog "/private/var/log/apache2/lab.domain-error_log"
CustomLog "/private/var/log/apache2/lab.domain-access_log" common
<Directory "/Users/igor/sites/advanced/">
Options Indexes MultiViews
AllowOverride All
Allow from all
Require all granted
</Directory>
</VirtualHost>
然后添加到主机127.0.0.1高级。重启Apache,但浏览器显示403错误!它可能是什么?