Localhost website not displaying in Browser
Posted by: ljiggy_99 (---.hfc.comcastbusiness.net)
Date: August 29, 2014 08:51PM

New to wampserver however learning a lot from trial and error. Installed wampserver and got green icon on desktop...so far so good....created a database in phpmyadmin for my website. Created a document root folder for my website in the "www" folder however when I try to display my localhost website in my browser, all it shows is the Wampserver homepage and not the actual website that's contained in the document root folder.

Any help is very appreciated...thanks!

Wampserver 2.5 installed for windows 32-bit

Currently have green icon

Created a virtual host's file but not sure I did it correctly



Edited 2 time(s). Last edit at 08/29/2014 08:55PM by ljiggy_99.

Options: ReplyQuote
Re: Localhost website not displaying in Browser
Posted by: thebigquestion (---.212-202-24.mc.videotron.ca)
Date: August 30, 2014 12:26AM

did you add the name of the folder you created to your C:\WINDOWS\system32\drivers\etc\hosts file ?

ex: you create a folder named "folder" in ( C:/wamp/www/folder )

now you open your C:\WINDOWS\system32\drivers\etc\hosts , you need to open this in notepad using administration rights and it might be a hidden system file as well and not show until you click the show hidden files box under your folder options in your windows control panel ( google "show hidden files win X, X being the version you have xp,7,8, ect.... it will explain how to do it for you )

once you have properly opened this file you'll see the following at the bottom, disregard the lines with "#" in front of them, they aren't read by the system and are there as information for you to read... near the bottom you'll see :

127.0.0.1 localhost
::1 localhost


change it to this

127.0.0.1 localhost
127.0.0.1 folder
::1 localhost
:: folder

The folder being whatever you named the folder you created in your c:/wamp/www directory
MAKE SURE you leave at least one space between the 127.0.0.1 and the ::1 and whatever the folder name is !!!!

save the file

open it AGAIN and make SURE your changes are now there, if so close it and be happy knowing they're there smiling smiley

Then you need to either reboot your pc or open a command prompt and type the following into it :

net stop Dnscache

when it says stopped, type :

net start Dnscache

when its started, close the command prompt window

stop all services in your winamp menu then restart them, I personally like to stop them, exit it , then restart wamp completely to be 100%, each time I alter something, but that's just me...

if your virtual host is set up correctly, you should work now
your virtual host should look like this ( I'll leave out all the "#" lines to save typing....

<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName localhost
ServerAlias localhost
<Directory "c:/wamp/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>


<VirtualHost *:80>
DocumentRoot "c:/wamp/www/folder"
ServerName folder
<Directory "c:/wamp/www/folder">
AllowOverride All
Require local
</Directory>
</VirtualHost>


again, substitute the name of your folder you created in the C:/wamp/www/ directory where it says "folder"


it's all right here :
[forum.wampserver.com]

a very informative and excellent read !



Edited 6 time(s). Last edit at 08/30/2014 12:54AM by thebigquestion.

Options: ReplyQuote


Sorry, only registered users may post in this forum.