How To: Get XAMPP working on Windows Vista


I do a lot of my testing regarding webdesign on a local test server on my computer so I can iron out any errors before the whole system goes live. Commonly called WAMP (Windows, Apache, MySQL, PHP) this is a great way for newcomers and veterans to test and tweak new things directly on their computer, much like how websites would act online.

I use XAMPP for my testing purposes which worked perfectly out of the box under Windows XP. However under Windows Vista I hit a snag… It wasn’t working! Thankfully I have come across a solution which fixes this issue.

First, you need to navigate your way to this folder: C:\Windows\System32\drivers\etc

You should see a file called hosts. Open it in Notepad and you should see the following…


You should see the text ::1 localhost“. Now you need to comment that out by simply adding “#” to the front of it, as outlined in the red highlighter. So it now should read:

#::1 localhost

Above it, add the text “ localhost“. This simply tells Windows Vista to re-direct any address called “localhost” to point to XAMPP, which resides at So both lines should now read: localhost
#::1 localhost

Save the file (CTRL+S) and load up XAMPP. Open up your browser of choice and type in “localhost” in the address bar – Everything should be working now. Job done! I hope this helps out other people who use local test servers under Windows Vista too!