如何增加Apache的端口,phpStudy下
1.编辑文件httpd.conf 找到
Listen 80
在下面加一行
Listen 88
2.再找到虚拟主机(X:\Program Files\phpStudy\Apache2\conf\extra\httpd-vhosts.conf)部分的
NameVirtualHost 210.21.112.*:80
<VirtualHost 210.21.112.*:80>
ServerAdmin ilos4@126.com
DocumentRoot /home/easy
ServerName phpv.net
ServerAlias www.phpv.net
</VirtualHost>
在其下方加入
NameVirtualHost 210.21.112.*:88
<VirtualHost 210.21.112.*:88>
ServerAdmin ilos4@126.com
DocumentRoot /home/easy
ServerName phpv.net
ServerAlias www.phpv.net
</VirtualHost>
保存退出.再重启apache服务.