wamp 配置多端口虚拟主机

应用场景:如局域网内访问wamp下的指定网站

修改httpd.conf新增端口,如:

#新增8080端口
Listen 0.0.0.0:8080
Listen [::0]:8080

配置虚拟主机,httpd-vhost.conf

<VirtualHost *:8080>
    ServerName www.test.com
    DocumentRoot "e:/wamp/www/test/public"
    <Directory  "e:/wamp/www/test/public/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

此时局域网其他电脑即可通过IP:8080获取网站接口数据了

Tags: 配置

添加新评论