APACHE配置多站点

1、C:\Windows\System32\drivers\etc\hosts

文本末尾添加:

127.0.0.1  www.xxx.com

2、apache->httpd.conf

文本末尾添加:

<virtualhost *:80>
DirectoryIndex index.html index.php
ServerName www.xxx.com
DocumentRoot "C:/xxx"
<directory "C:/xxx">
Options Indexes FollowSymLinks Includes ExecCGI
DirectoryIndex index.html index.htm index.php
AllowOverride All
Order allow,deny
Allow from all
</directory>
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common

</virtualhost>

 

如果是MVC访问方式,同时要开启apache模块:rewrite_module

你可能感兴趣的:(apache)