【发布时间】:2019-04-04 20:55:00
【问题描述】:
我想在我的域中放置两个站点,一个可由 "domain.com" 访问,另一个可由 "subdomain.domain.com" 访问有自己的文件夹 "/var/www/html/domain/" 和 "/var/www/html/subdomain/"
为了做到这一点,我以这种方式配置了虚拟主机
Listen 80
<VirtualHost *:80>
ServerName remi-fongaufier.fr
Alias /postfixadmin "/var/www/html/postfixadmin/public/"
DocumentRoot /var/www/html/remi-fongaufier/
DirectoryIndex index.html
</VirtualHost>
<VirtualHost *:80>
ServerName omnialib.remi-fongaufier.fr
DocumentRoot /var/www/html/omnialib/
DirectoryIndex index.php
</VirtualHost>
但似乎当我尝试访问子域时,服务器尝试在 "/var/www/html/domain/subdomain"
中搜索文件有什么办法解决这个问题吗? 谢谢
【问题讨论】:
标签: apache virtualhost