403 forbidden error of localhost after default installation
Posted by: Daremo (---.ri.ri.cox.net)
Date: March 11, 2013 03:11AM

I am brand new to wampserver so I am thinking this problem is something obvious, but I am stumped and searching has not gotten me anything concrete.

I was following this guide [www.youtube.com] and I can't get localhost to work. 127.0.0.1 works correctly though.

What am I missing?

Thanks!

p.s. I went through the default installation of the preinstallation C++ package and then the wampserver 32bit and php 5.4 using firefox as my browser. And this is all running on a 32bit Vista machine.

Options: ReplyQuote
Re: 403 forbidden error of localhost after default installation
Posted by: RiggsFolly (---.as13285.net)
Date: March 11, 2013 10:30AM

Please check your HOSTS file, and make sure it has a reference to

127.0.0.1 localhost



HOW TO EDIT THE HOSTS FILE
The hosts file is protected by windows, in order to save it you must have Administrator privilages.
Vista/W7/W8 you may think you are an Administrator BUT YOU ARE NOT.

To successfully save the hosts file do this to launch your editor with Admin Privilages.

Locate your editors icon on the desktop or from the Start menus ( notepad will do if you have nothing else )
left click + shift over your chosen editor icon - will show a menu.
select "Run As Administrator" from the menu.
Navigate your editor to the c:\windows\system32\drivers\etc\hosts file.

When you have made changes you will now be allowed to save them.

Options: ReplyQuote
Re: 403 forbidden error of localhost after default installation
Posted by: Daremo (---.ummhc.org)
Date: March 11, 2013 01:18PM

I will double check this when I get home tonight, but I had seen this as a possible solution in other posts so I checked it.

After I posted here, I installed the same wampserver package on another machine running xp and it works correctly with no changes to the HOSTS file.

This to me means its definately something in the default setup of Vista SP2 and its probably something really dumb too...

I have already disabled the firewall, and I will double check the HOSTS file tonight. Anything else to look for?

Options: ReplyQuote
Re: 403 forbidden error of localhost after default installation
Posted by: Daremo (---.ri.ri.cox.net)
Date: March 12, 2013 11:17AM

Fixed.

For some reason, the hosts file had an error in it and it looked like this.

127.0.0.1 localhost
:: :1

127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost

Once I fixed the hosts file, everything started working.

Options: ReplyQuote
Re: 403 forbidden error of localhost after default installation
Posted by: ibnmik1 (37.104.29.---)
Date: March 12, 2013 06:58PM

What should the whole HOST file look like (in windows 8)? I'm having the same problem.



Edited 1 time(s). Last edit at 03/12/2013 06:59PM by ibnmik1.

Options: ReplyQuote
Re: 403 forbidden error of localhost after default installation
Posted by: RiggsFolly (---.as13285.net)
Date: March 12, 2013 09:36PM

It should have some comments at the top and then this

127.0.0.1 localhost

Options: ReplyQuote


Sorry, only registered users may post in this forum.