WAMP服务器,本地主机无法正常工作 [英] WAMP server, localhost is not working

查看:101
本文介绍了WAMP服务器,本地主机无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Windows 7自动更新时,我的WAMP服务器本地主机已损坏.

My WAMP server localhost was broken when my Windows 7 updates automatically.

我的端口80已被IIS服务器使用.

My port 80 is already used by IIS server.

我在网站上进行搜索,很多人建议我需要将端口80更改为端口8080或其他区别.

I searched on website, many people suggested that I need to change the port 80 to port 8080 or something difference.

我将Listen:80更新为Listen:8080,并将ServerName localhost更新为ServerName localhost:8080.

I updated Listen:80 to Listen:8080 and ServerName localhost to ServerName localhost:8080.

但是它仍然无法正常工作,让我空白了.

But it is still not working and leaves me a blank page.

有人可以帮我解决这个问题吗?

Can anyone help me to solve this problem?

推荐答案

转到此链接..

http ://www.ttkalec.com/blog/resolving-yellow-wamp-server-status-freeing-up-port-80-for-apache/

更新:使用XAMP

写完这篇博文后,我发现XAMP尽管与WAMP非常相似,但并不强迫您将Apache作为服务运行,而是可以将其作为常规流程运行.所以我最终使用了XAMP,并将Apache端口更改为8080,所以现在一切正常.

After I’ve written this blog post I’ve figured out that XAMP, although very similar to WAMP, doesn’t force you to run Apache as a service, instead it can run it as a regular process. So I ended up using XAMP, and changed Apache port to 8080 so now everything works.

WAMP问题

如果您使用的是Window 7或更高版本,则可能是WAMP服务器试图在端口80上启动Apache服务而失败的时候遇到了问题.

If you have Window 7 or later you may have come across issues with WAMP server trying to start Apache service on port 80 and failing.

可能会出现许多冲突和问题. 在尝试任何操作之前,请检查是否具有ZoneAlarm,Nod32或任何其他可能阻止Apache服务器的程序/防火墙. 如果您确定防火墙不是问题所在,可以尝试以下几种修复方法.

There are many conflict and issues that might have come up. Before you try anything, check if you have ZoneAlarm, Nod32, or any other program/firewall that might be blocking Apache server. If you’re sure that firewall isn’t the problem here is a couple of fixes that you can try.

注意:尝试每种修复方法后,必须单击黄色的WAMP图标,然后选择重新启动所有服务"

NOTE: After every fix you try, you must click on yellow WAMP icon and choose Restart All Services

检查是什么原因导致了问题

Checking which process is causing the problem

在运行"命令框或开始搜索"中键入cmd,打开命令提示符"窗口,然后按Enter. 输入以下命令: netstat -o -n -a | findstr 0.0:80 每行的最后一列是所标识的过程(过程ID或PID). 通过将PID与任务管理器中的PID编号进行匹配,来确定哪个进程或应用程序正在使用该端口. 如果您在任务管理器"中没有看到PID列,则需要转到进程"标签->查看菜单"->选择列",然后从列表中选择"PID" 现在,您可能已经确定了保留端口80的应用程序,或者您发现系统正在使用端口80.这意味着内部服务之一正在使用您的端口,在这种情况下,请继续阅读. 与Skype冲突

Open Command Prompt window by typing cmd in Run command box or Start Search, and hit Enter. Type in the following command: netstat -o -n -a | findstr 0.0:80 The last column of each row is the process identified (process ID or PID). Identify which process or application is using the port by matching the PID against PID number in Task Manager. If you don’t see PID column in your Task Manager you need to go to Processes tab -> View Menu -> Select Columns and choose PID from the list Now, you may have identified application that reserves port 80, or you may have found out that System is using your port 80. That means that one of internal services is using your port, in which case continue reading further. Conflict with Skype

如果发现Skype正在使用端口80,则需要更改Skype中的某些设置.在Windows上,Skype保留用于HTTP的端口80. Apache需要此端口.因此,如果您正在运行Skype,则必须转到工具">选项".然后在高级"部分中,选择连接".取消选中使用端口80和443作为传入连接的替代方法"的复选框.退出Skype并重新启动.该问题应得到解决.

If you found out that Skype is using your port 80, you need to change some settings in Skype. On Windows, Skype reserves port 80 which is used for HTTP. Apache requires this port. So if you’re running Skype, you must go to Tools > Options. Then in the Advanced section, select Connection. Un-check the box that says "Use port 80 and 443 as alternatives for incoming connection". Quit Skype and restart. The issue should be resolved.

与IIS服务器冲突

IIS服务器和Apache都是使用端口80的Web服务器,因此它们可能会发生冲突.尝试通过以下方式停止IIS:

IIS Server and Apache are both web server that use port 80 so they might be in conflict. Try stopping IIS by:

进入控制面板->管理工具-> Internet信息服务 右键单击默认网站 单击弹出菜单中的停止"选项,然后查看端口80上的侦听器已清除. 与MS SQL Server冲突

Going into Control Panel -> Administrative Tools -> Internet Information Services Right click on Default Web Site Click on Stop option in the popup menu, and see of the listener on port 80 has cleared. Conflict with MS SQL Server

MS SQL Server安装了显然默认为80的"SQL Server Reporting Services(MSSQLSERVER)".您可以尝试将其停止以释放端口80.

MS SQL Server installs "SQL Server Reporting Services (MSSQLSERVER)" that apparently defaults to 80. You can try stopping it to free up port 80.

转到控制面板"->管理工具"->服务" 那里找到MSSQLSERVER(也可以在SQL Server下找到) 双击它->单击停止 在启动类型下:选择手动 其他可能导致冲突的服务

Go to Control Panel -> Administrative Tools -> Services There find MSSQLSERVER (might be found also under SQL Server) Double click it -> Click Stop Under Startup type: choose Manual Other Services that can cause conflicts

如上文针对MS SQL Server所述:

As described above for MS SQL Server:

转到控制面板"->管理工具"->服务" 您可以尝试停止: Web部署代理服务 Windows远程管理 Autodesk EDM服务器 万维网发布服务 他们可能更多,但这就是我尝试过的地方.

Go to Control Panel -> Administrative Tools -> Services You can try stopping: Web Deployment Agent Service Windows Remote Management Autodesk EDM Server World Wide Web Publishing Service There are probably more of them, but this where the ones that I tryed.

尝试直接关闭HTTP驱动程序

Try turning off HTTP driver directly

如果您已经尝试了上述所有操作,但是WAMP服务器仍然无法正常工作,则可以尝试一下(最终对我有所帮助).

If you’ve tried everything mentioned above and your WAMP server is still not working you could try this (which eventually helped me).

右键单击我的电脑"图标->属性" 转到设备管理器 点击查看菜单,然后选择显示隐藏的设备 现在,从列表中选择非即插即用"设备 双击HTTP->转到驱动程序 对于类型,选择禁用 重启你的电脑 在计算机启动后,您应该能够启动WAMP服务器.

Right click on My Computer icon -> Properties Go to Device Manager Click on View menu and chooseShow hidden devices Now from the list choose Non-Plug and Play devices Double click HTTP -> go to Driver For Type choose Disabled Restart your computer After your computer boots up you should be able to start up WAMP server.

如果其他所有操作失败

您可以尝试将Apache服务器更改为侦听端口80以外的其他端口.

You could try changing Apache server to listen to some other port other than port 80.

在任务栏中单击黄色的WAMP图标 选择Apache-> httpd.conf 在里面找到这两行代码:

Click on yellow WAMP icon in your taskbar Choose Apache -> httpd.conf Inside find these two lines of code:

听80 ServerName本地主机:80 并将它们更改为这样的内容(它们彼此之间不是彼此相邻的):

Listen 80 ServerName localhost:80 and change them to something like this (they are not one next to the other):

听8080 ServerName本地主机:8080 重新启动所有服务,然后尝试在浏览器中键入localhost:8080. WAMP服务器现在应该可以正常工作.

Listen 8080 ServerName localhost:8080 Restart all services, and try typing localhost:8080 into your browser. WAMP server should now be working.

这篇关于WAMP服务器,本地主机无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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