多端口
-
如何在WampServer中配置多端口访问?
在WampServer下,可以通过修改配置文件来实现多端口访问。具体操作如下:,,1. 打开Apache的配置文件httpd.conf,找到Listen这一行,将其修改为:Listen 80, 8080, 8081,表示同时监听80、8080和8081三个端口。,,2. 在httpdvhosts.conf文件中,为每个端口配置一个虚拟主机。,,“,, DocumentRoot “C:/wamp64/www”, ServerName localhost,,,, DocumentRoot “C:/wamp64/www/port8080″, ServerName localhost:8080,,,, DocumentRoot “C:/wamp64/www/port8081″, ServerName localhost:8081,,“,,3. 重启Apache服务,使更改生效。,,这样,就可以通过不同的端口访问不同的网站了。