如何在 WAMP 中更改 apache 的端口号 [英] How to change port number for apache in WAMP

查看:49
本文介绍了如何在 WAMP 中更改 apache 的端口号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 WAMP 服务器的新手并将其安装在我的系统上,但是在安装它之后,当我通过浏览器中的 http://localhost/ 这样的 localhost url 检查它时,它不起作用.我收到404 错误和空白页.

I am new to WAMP server and installed it on my system but after installing it when I check it by going to localhost url like this http://localhost/ in the browser it is not working. I am getting a 404 error and blank page.

这是因为 IIS 服务器正在使用 Wamp 服务器 中默认的 80 端口.所以请让我知道如何在 Wamp 服务器中更改端口号并解决此问题.

This is because my 80 port which default in Wamp server is being used by IIS server. So please let me know how to change port number in Wamp server and solved this problem.

推荐答案

单击 WAMP 服务器图标,然后从 Config Files 下的菜单中选择httpd.conf.一个长文本文件将在记事本中打开.在这个文件滚动直到读取 Port 80 的行并将其更改为读取 Port 8080,保存文件并关闭记事本.再次单击 wamp 服务器图标,然后选择重启所有服务.在我们之前还需要再做一项改变完毕.在 Windows 资源管理器中找到安装 WAMP 服务器的位置默认情况下是 C:\Wamp.

Click on the WAMP server icon and from the menu under Config Files select httpd.conf. A long text file will open up in notepad. In this file scroll down to the line that reads Port 80 and change this to read Port 8080, Save the file and close notepad. Once again click on the wamp server icon and select restart all services. One more change needs to be made before we are done. In Windows Explorer find the location where WAMP server was installed which is by Default C:\Wamp.

更新:在较新版本的 WAMP 上,单击 WAMP 服务器图标 > Apache > httpd.conf,然后将行 Listen 80 更改为 Listen 8080 或您想要的任何端口.

Update : On a newer version of WAMP, click the WAMP server icon > Apache > httpd.conf, then change the line Listen 80 to Listen 8080 or any port you want.

更新: 在WAMP 3.1.6版本上,在任务栏中的wamp服务器图标上点击右键,选择工具"->Apache使用的端口:80"->使用80以外的端口",会弹出一个输入框,在里面输入一个新的端口,点击确认按钮,然后重启wamp.

Update: On 3.1.6 version of WAMP , right click on the wamp server icon in the taskbar ,select "tools"-> "Port used by Apache:80" -> "use a port other than 80", an input box will pop up , input a new port in it,click confirm button , then restart wamp .

这篇关于如何在 WAMP 中更改 apache 的端口号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆