修改wamp apache 默认端口

 

目标:新配置一个虚拟主机,要求端口为8080,但要保证原来的80端口仍可用

1、修改 httpd.conf

  修改wamp apache 默认端口

  开启vhost文件支持

  修改wamp apache 默认端口

2、httpd-vhosts.conf 中增加,记得把原来的内容全部注释掉

  

<VirtualHost *:80>

    DocumentRoot "E:/wamp/www/test"

    ServerName test.cm

    ServerAlias test.cm

    ErrorLog "logs/dummy-host.example.com-error.log"

    CustomLog "logs/dummy-host.example.com-access.log" common

</VirtualHost>



<VirtualHost *:8080>

    DocumentRoot "E:/wamp/www/test"

    ServerName test.cm

    ServerAlias test.cm

    ErrorLog "logs/dummy-host.example.com-error.log"

    CustomLog "logs/dummy-host.example.com-access.log" common

</VirtualHost>

3、重启apache

 

你可能感兴趣的:(apache)