//

WAMP SERVER error: localhost goes to www.localhost.com

by dave on November 29, 2009



WAMPSERVER is the best tool to experiment all wordpress changes in local enviornment. In recent past i changed my Windows to Vista, 64 bit and then reinstalled the wamp server. The very first error that any one can experience right after installation is that server does not go online. The basic check here is to quit applications that may utilize port 80 for example Skype etc. Quitting Skype will put wamp online and you would get nice little white icon in taskbar status area/systray.

After putting wamp server online, i couldn’t access the localhost page as when i clicked on “localhost” menu option from left menu click it showed the error and took me to http://www.localhost.com/. If you are running it in firefox you would see the “The connection was reset” screen. Refreshing it many times and rebooting the system did not help as well.

wamp-error

Solution:
See if you can get the wamp local screen by entering the local ip address: 127.0.0.1. If you get the local configuration screen of wamp by ip address then you need to make changes in your hosts file. You can find your local hosts file in following location:

OS Version(s) Location
Windows 95, 98, Me %WinDir%\
Windows NT, 2000, XP, 2003, Vista, 7 %SystemRoot%\system32\drivers\etc\ by default.
Macintosh 9 and earlier System Folder: Preferences or System folder
Mac OS X, iPhoneOS /private/etc/hosts

† Users of 64-bit versions of Windows Server 2003, Server 2008, and Vista (but not Windows 7) cannot access the HOSTS file with a 32-bit editor.
‡ Actual location defined in Registry key \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath.

hosts-file1Open the hosts file and make sure 127.0.0.1 is associated with localhost or that is not commented out. By the way there are more chances that your file would look like this:

127.0.0.1 localhost
::1       localhost

Vista has a habit of mapping localhost to IPv6 (: : 1) instead of IPv4, so you need to set up IIS or Apache or whatever you’re using to bind ports on both IPv6 and IPv4 to get localhost to work. The quick workaround is that you comment out the Ipv6 entry by just putting # before it starts. Commenting out would look like this:

#::1       localhost

I hope the quick workaround works for you.

Related Articles:

  1. Youtube – How to Solve ‘Object Moved to Here (ERROR)’ in Pakistan
  2. WordPress Fatal error: Cannot redeclare wp_load_image() (previously declared in…
  3. WordPress Fatal error: Call to undefined function _deep_replace()…pluggable.php on line 884
  4. How to Secure Your Apache Web Server on UNIX / Linux – 10 Tips and Techniques
  5. Troubleshoot: Unable to create directory+Is its parent directory writable by the server?
  6. Fix Purple Screen – Jailbreakme error

{ 6 comments… read them below or add one }

Justin Lavelle March 15, 2010 at 9:52 am

Thank You

The work-around was a simple way to fix this error under Windows 7 32bit.
Initially I experience NTFS Permission issues on files within the etc folder, but granted myself the necessary permissions and everything is working fine.

J

Reply

batkhishig bazarragchaa March 24, 2010 at 8:18 am

it works thanks thanks thank you so mach

Reply

MJK March 24, 2010 at 6:37 pm

You are always welcome :)

Reply

R October 9, 2010 at 2:09 am

it works…Thank you very very much

Reply

Jake December 3, 2010 at 7:18 am

It worked perfectly.. Thank you so much for the help..

Reply

Adam January 4, 2011 at 6:25 pm

What’s the not-quick workaround? In other words, why is this happening in the first place?

Reply

Leave a Comment

Previous post:

Next post: