Http://Localhost/ Not Working on Windows 7. What's the Problem

http://localhost/ not working on Windows 7. What's the problem?

To fix the port 80 problem do:

From cmd as administrator:

  1. sc config http start= demand (you need a space after the equal sign and not before)
  2. Reboot
  3. Run the command (netsh http show servicestate) as administrator to check that the port 80 is in use

After you have run this command, you can disable http.sys as follows:

  1. net stop http (stop the process)
  2. Sc config http start= disabled (if you want to disable the service forever)

it works for me.

localhost is working but not 127.0.0.1 in windows 7

Two or three shot in the dark guesses. This is how I would diagnose the issue.

  • It's possible that your web browser is resolving localhost on your computer to the IPV6 loopback address, ::1. Compare the results of typing http://[::1] and compare the results to http://127.0.0.1 and http://localhost to see if that reveals anything. As to why xampp is working on IPV6, but not IPV4 is another issue.

  • You might have a web proxy installed on your network and your Internet Options or browser settings is configured to use it. This will bypass DNS and the hosts file and send the request straight to the proxy. And the proxy server probably resolves 127.0.0.1 and localhost differently. This also applies to any sort of local proxy, internet speed-up software, anti-virus scanner, Fiddler, etc... Try going to Control Panel->Internet Options and select the Connections tab. Then select the "LAN settings" button. Make sure all the checkboxes are turned off on this dialog. Run the "Setup" button at the top of the Connections dialog just to be sure. See picture below

  • Disable the Windows Firewall and/or any other sort of Firewall software you may have. Just so we can rule that out. Any change?

  • But your BEST option will be to install Wireshark or Netmon and get a trace of http://localhost connection and compare that to the http://127.0.0.1 address. That should reveal something...

Telnet: localhost on Windows 7 will not connect to localhost

Well, I'd guess your node.js server is waiting for you to issue a GET request.
When it is waiting after the message Connecting to Localhost....

The telnet client doesn't visually indicate that it is connected. Just write your request and it should get entered.

Put your GET request in:

GET / HTTP 1.1

http://localhost not working correctly on WAMP

This is windows, file permissions are not going to be the problem.

The problem will be in your httpd.conf and the security setting

Here is the clue client ::1:50536]. Its using a IPV6 ip address, so my guess would be that you are not allowing access from the loopback address ::1

To prove I am on the right track if you use this address in your browser it should work http://127.0.0.1/netwerken/index.php ... assuming you are running a script called index.php, if not use the one you are running.

First check that your c:\windows\system32\drivers\etc\hosts file contains these 2 lines

127.0.0.1  localhost
::1 localhost

Then check your httpd.conf ( use the wampmanager menus to edit it so you get the correct file )

Look for this section, its using older APache 2.2 syntax.

<Directory "d:/wamp/www">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
# Require all granted
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
Allow from localhost
</Directory>

And change it to

<Directory "d:/wamp/www">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Require local
# Apache 2.4 syntax for any of the addresses 127.0.0.1 or ::1 or localhost
</Directory>

I suggest you read this as well, some errors got released in WampServer 2.4 and this should tell you how to fix them



Related Topics



Leave a reply



Submit