通过冲突我的意思是一个域有效,它会导致/var/www/html
并读取主index.php
文件,但是导致/var/www/html/website
的第二个域会给我一个拒绝根目录的权限" /
"所以我想知道它是否将/var/www/html
解释为/
还是别的什么?
感谢您的帮助
仅虚拟主机设置端口80
# works
<VirtualHost *:80>
ServerName www.site.us
ServerAlias site.us http://www.site.us
DocumentRoot /var/www/html
# CustomLog /directory log file location not enabled
# ErrorLog /directory log not enabled
</VirtualHost>
# both site2.com and www.site2.com have 404 problem
# The requested URL / was not found on this server.
<VirtualHost *:80>
ServerName www.site2.com
ServerAlias site2.com http://www.site2.com
DocumentRoot /var/www/html/site2
# CustomLog /directory log file location not enabled
# ErrorLog /directory log not enabled
</VirtualHost>
# works fine
<VirtualHost *:80>
ServerName www.site3.com
ServerAlias site3.com http://www.site3.com
DocumentRoot /var/www/html/site3
# CustomLog /directory log file location not enabled
# ErrorLog /directory log not enabled
</VirtualHost>