Apache 虚拟主机配置
Listen 80
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "C:/data/AppServ/www/a"
ServerName a.com
ServerAlias www.a.com
ErrorLog "logs/dummy-host.a-error.log"
CustomLog "logs/dummy-host.a-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "C:/data/AppServ/www/b"
ServerName b.com
#子域名泛解析
ServerAlias *.b.com
ErrorLog "logs/dummy-host.b-error.log"
CustomLog "logs/dummy-host.b-access.log" common
</VirtualHost>
#禁止列出目录,删除Indexes
Options Indexes FollowSymLinks
#Apache Rewrite
LoadModule rewrite_module modules/mod_rewrite.so
AllowOverride All #允许任何目录使用“.htaccess”
RewriteEngine on #开启Rewrite模块
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。