1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

how associate 127.0.0.1 to localhost

Discussion in 'Apache' started by superjacent, Mar 27, 2009.

  1. #1
    I've installed WampServer on my Windows Vista machine. Haven't used it for a while but now for some reason I can't access http://localhost, firefox tells me, "Firefox can't establish a connection to the server at localhost.". I can access WampServer via http://127.0.0.1/ and the main WampServer default page appears.

    Apache version : 2.2.8
    PHP : 5.2.6
    MySql : 5.0.51b

    Which file(s) do I need to edit in order to associate localhost to 127.0.0.1
     
    superjacent, Mar 27, 2009 IP
  2. MakeADifference

    MakeADifference Peon

    Messages:
    476
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You have to put an entry in /etc/hosts


    Location in XP: c:\windows\system32\drivers\etc\hosts, Should be almost same in Vista
     
    MakeADifference, Mar 27, 2009 IP
  3. superjacent

    superjacent Peon

    Messages:
    98
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you, found the file and made the necessary edit. All that was required was:

    127.0.0.1   localhost
    Code (markup):
     
    superjacent, Mar 27, 2009 IP