Apache开启多端口

1.在httpd.conf中添加新的监听端口:Listen 8080

2.  # Virtual hosts

  #虚拟主机 开启多端口 原先是注释掉的

  Include conf/extra/httpd-vhosts.conf

3.修改httpd-vhosts.conf内容,注意此文件的路径。

   新增如下内容:

<VirtualHost *:8080> 
   ServerAdmin webmaster@dummy-host.localhost 
  DocumentRoot "D:\Apache Software Foundation\apache-tomcat-6.0.33\webapps2" 
  ServerName localhost 
  ServerAlias localhost 
  ErrorLog "logs/dummy-host.localhost-error.log" 
  CustomLog "logs/dummy-host.localhost-access.log" common 
  <Directory "D:\Apache Software Foundation\apache-tomcat-6.0.33\webapps2"> 
    Options Indexes FollowSymLinks 
    AllowOverride None 
    Order allow,deny 
    Allow from all 
  </Directory> 
</VirtualHost>