您的位置:首页 > 运维架构 > Apache

Apache-一个IP多个主机域名

2013-11-13 15:24 447 查看
#配置虚拟主机名
NameVirtualHost 192.168.209.128
<VirtualHost 192.168.209.128>
DocumentRoot /htdocs/win
ServerName www.a.com
</VirtualHost>
<VirtualHost 192.168.209.128>
DocumentRoot /htdocs/manager
CustomLog /htdocs/manager/home-access_log common
ServerName www.b.com
</VirtualHost>

#配置对应目录访问权限

<Directory "/htdocs/win">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<Directory "/htdocs/manager">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

#配置完毕后重启Apache并修改host文件使www.a.com和www.b.com都指向192.168.209.128
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: