linux apache2 下虚拟主机设置
下面是基于name的设定方法的例子,只需要把下面内容加入到apache配置文件中(httpd.conf)
比如现有域名 game.syw.sh.cn 已能正常工作
设定另一个虚拟主机 songyf003.vicp.net
NameVirtualHost *
<VirtualHost *>
ServerName game.syw.sh.cn //注意要和你的全局配置文件一致!
# ServerAlias domain.tld *.domain.tld //这项为别名
DocumentRoot /www/site0 //注意要和你的全局配置文件一致!
</VirtualHost>
<VirtualHost *>
ServerName songyf003.vicp.net
DocumentRoot /www/site1
<Directory "/www/site1"> //这段为访问权限的设置!假如出现403错误,可加入此段
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory> //这段为访问权限的设置!假如出现403错误,可加入此段
</VirtualHost>
相关文档(Relevant Entries)
Posted on April 23, 2007 6:38 PM
| Permalink | | | TrackBacks (0)
TrackBack URL for this entry:
http://www.wujianrong.com/mt-tb.cgi/5090
http://www.wujianrong.com/mt-tb.cgi/5090