杨新春

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

1.在httpd.conf添加多个端口,如下

Listen 80
Listen 8080

2.开启Include conf/extra/httpd-vhosts.conf

3.具体代码如下

<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "F:\phpStudy\WWW"
ServerName 192.168.1.134
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>

# Add any other Virtual Hosts below
<VirtualHost *:8080>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "F:\phpStudy\WWW\router"
ServerName 192.168.1.134
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>

posted on 2015-12-16 14:04  杨新春  阅读(305)  评论(0编辑  收藏  举报