之前在apache上配了svn和trac是通过IP进行访问. 现在要加了个VirtualHost,加完后发现原IP访问的DocumentRoot无法访问. 解决方法...
virtualhost
关于Apache2 VirtualHost二级域名只生效一个的问题
StandardApache2 config文件新增二级域名如下:
<VirtualHost *:80>
ServerName maillist.yemaosheng.com
ServerAlias maillist.yemaosheng.com
DocumentRoot /var/www/html/maillist.yemaosheng.com
</VirtualHost>
<VirtualHost *:80>
ServerName cms.yemaosheng.com
ServerAlias cms.yemaosheng.com
DocumentRoot /var/www/html/cms.yemaosheng.com
</VirtualHost>
<VirtualHost *:80>
ServerName www.yemaosheng.com
DocumentRoot /var/www/html/www.yemaosheng.com
</VirtualHost>