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模块
时间: 2024-10-18 19:45:53