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>

AddThis Social Bookmark Button

相关文档(Relevant Entries)
bz2解压
GCC - 一切从这里开始
完全用Linux工作,摈弃Windows--作者:王垠
Linux下软件的安装与卸载
Redhat Linux 9/AS 3上安装清华紫光拼音输入法智能五笔全拼等
xwindow - Linux中文拼音输入法全接触
Unix/Linux 平台任务的自动化
linux的find查找命令用法
Posted on April 23, 2007 6:38 PM | | | | TrackBacks (0)

引用地址(TRACKBACKS)
 
TrackBack URL for this entry:
http://www.wujianrong.com/mt-tb.cgi/5090

发布评论(ADD YOUR COMMENTS)
 
感谢您参与评论;发表您的意见时请保持文章的相关性;不相关的或是单纯宣传的内容可能会被删掉。您的E-mail只是用来确认您发表的文章,不会出现在网页上。
Please keep your comments relevant to this blog entry. Email addresses are never displayed, but they are required to confirm your comments.

称呼(Name):      记住我的个人信息(Remember)
邮箱(Email):
网址(URL):
评论(Add your comments):

相关内容