Windows下Apache使用虚拟主机(多域名多站点)的设置

转自 http://hi.baidu.com/liucanyu/blog/item/fb4a830a4fd17a3bb1351dbe.html

 

1.在httpd.conf 

  寻找代码DocumentRoot "D:/Apache2.2/htdocs"(这个是你安装apache的位置,自己应该晓得),把这段也打上"#",注释掉.

2.httpd.conf add code


Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all



Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

 

3.conf/extra/httpd-vhosts.conf  add code


    DocumentRoot D:/Apache/htdocs/jserp/trunk
    ServerName jserp.localhost.com




    DocumentRoot D:/Apache/htdocs/sycrm
    ServerName sycrm.localhost.com

 

4.C:/WINDOWS/system32/drivers/etc/host add code

127.0.0.1 jserp.localhost.com
127.0.0.1 sycrm.localhost.com

 

5.restart apache--- ok

你可能感兴趣的:(java)