WAMP: Cannot Connect To Localhost

2019-08-21 07:00发布

I'm just stuck on one little thing here but here is what I've done so far using websites and video tutorials (Note: I'm Running on Windows 10 and using Microsoft Edge as a browser for WAMP).

  • Disabled Skype

  • I went into the little WAMP menu/apache/httpd.conf and changed LISTEN to port 81.

  • It still said port 80 was being used by Windows IIS 10.0 so I went into the Command Prompt as admin and used "iisreset /stop". Now WAMP is green and online, yay.

  • I enter localhost at the top of the WAMP menu and it brings me to a webpage saying "Make sure you’ve got the right URL: http://localhost".

  • I have gone into (C:)/Wamp/www and changed a line of code in "index" to $suppress_localhost = false;. Nothing changed.

Now I'm in (C:)/Windows/System32/drivers/etc and editing the "hosts" file. The edit is simply uncommenting my ip address which will supposedly reveal where WAMP should be going. It will not allow me to save it unless I give myself full control which is done by right clicking the file and selecting properties. However, when I try to save the file it fails and says "Please check if this file is open in another program". This is what I am stuck on.

Does anyone know how to check what other programs are using this file or is there another method of connecting to localhost to WAMP?

Thanks in advance!

1条回答
闹够了就滚
2楼-- · 2019-08-21 07:23

First return Apache's listening port to 80.

Doing this "iisreset /stop" will only stop IIS until the next reboot. So it is better to uninstall IIS completely if you are not using it.

This I enter localhost at the top of the WAMP menu and it brings me to a webpage saying "Make sure you’ve got the right URL is probably due to the fact that there is more than once place where you need to change the listening port in apache, so when you put it back to

Listen 0.0.0.0:80
Listen [::0]:80

This will probably go away

SKYPE: You can configure SKYPE to not use port 80 or 443, but as far as I know you cannot do this to the tiles SKYPE, so uninstall that and then install the SKYPE App (from the SKYPE website). This can be reconfigured like this :-

Start SKYPE, Menu Tools -> Options -> Advanced -> Connection On this dialog, Uncheck the checkbox labeled

Use port 80 and 443 for additional incoming connections
and add a number to the `use port` field, something like `33333`

SKYPE should no longer attempt to use port 80.

The HOSTS file is protected by Windows, and possibly your Anti Virus also tried to protect it. To amend the HOSTS file you have to elavate your privilages to Administrator, and before you say you are, you are not. Start a command windows using the "Run as Administrator" option.

CD into C:\windows\system32\drivers\etc

run notepad hosts

Make your changes and save them

Host file should contain at least

127.0.0.1  localhost
::1  localhost
查看更多
登录 后发表回答