我想为管理员子域创建一个新的虚拟主机,但我有一个403 Forbidden错误。
我有这个vhost运行良好:
<VirtualHost *:80>
ServerName dev.website.com
# ServerAlias *.website.com
ServerAdmin webmaster@website
DocumentRoot "/home/dev/sites/website.com/dev/public"
<Directory /home/dev/sites/website.com/dev/public>
Options Indexes FollowSymLinks MultiViews
# AllowOverride All
Require all granted
</Directory>
ErrorLog /home/dev/sites/website.com/logs/error.log
</VirtualHost>
但是当我在第一个下面添加一个新主机时,我得到403错误。虽然我只是改变了#dev ;website.com&#34;到&#34; admin.website.com&#34; :
<VirtualHost *:80>
ServerName admin.website.com
# ServerAlias *.website.com
ServerAdmin webmaster@website
DocumentRoot "/home/dev/sites/website.com/dev/public"
<Directory /home/dev/sites/website.com/dev/public>
Options Indexes FollowSymLinks MultiViews
# AllowOverride All
Require all granted
</Directory>
ErrorLog /home/dev/sites/website.com/logs/error.log
</VirtualHost>
我重新启动了apache但仍无法正常工作。显然没有日志文件(/var/log/apache2/error.log或/home/dev/sites/website.com/logs/error.log)。
我在Debian 8上工作,我的Apache版本是2.4.10。
感谢您的帮助!