小保哥

博客园 首页 新随笔 联系 订阅 管理

拷贝自http://blog.chinaunix.net/uid-24352482-id-3033728.html


1,修改文件:Apache Http Server安装目录\apache2.2\conf\httpd-vhosts.conf
添加监听端口新端口,比如8001:

Listen 80
Listen 8001

 

2,打开已经注释掉的配置:

#Virtual hosts
Include conf/extra/httpd-vhosts.conf

 

3,在httpd-vhosts.conf文件中添加<VirtualHost标签>:

  1. <VirtualHost 10.2.20.12:8001>

  2.     ServerAdmin xxxxxx@live.com

  3.     DocumentRoot D:/httproot/viedonew

  4.     ServerName localhost_8001


  5.     AddDefaultCharset UTF-8


  6.     <Directory "D:/httproot/viedonew/">

  7.         Options All

  8.         AllowOverride All

  9.         Order allow,deny

  10.         Allow from all

  11.     </Directory>


  12. </VirtualHost>

 

4,重启apache服务器



posted on 2013-02-18 12:39  小保哥  阅读(283)  评论(0)    收藏  举报