码迷,mamicode.com
首页 > Web开发 > 详细

Apache 虚拟主机配置

时间:2015-01-08 19:42:05      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:

Listen 80

NameVirtualHost *:80

<VirtualHost *:80>
  ServerAdmin shaven@163.com
  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 shaven@163.com
  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模块

Apache 虚拟主机配置

标签:

原文地址:http://www.cnblogs.com/shaven/p/4211548.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!