Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : localhost doesn't resolve but http://127.0.0.1 does



Threaded Mode | Print  

 localhost doesn't resolve but http://127.0.0.1 does, http://localhost doesn't work http://127.0.0.1 does (5 Replies, Read 20170 times)
wujibifan
Group: Member
Post Group: Newbie
Posts: 4
Status:
Hi,

Upgraded Ampps to version 2.2 now I can't access localhost with this address in browser:

localhost.com/

which is the address used to access local web in the Ampps cpanel. I can't access Ampps home or the Ampps admin page with the http address.

Apache and Mysql seem to be working, and I've reset the configuration to default several times although I've always used the default config.

I've also uninstalled then reinstalled Ampps several times.

However, when I go to127.0.0.1/ I see all my sites and folders and everything seems to work. I can also access home for Ampps using 127.0.0.1/ampps/

I have no idea how to fix this issue. Any tips are appreciated.

Thanks
IP: --   

localhost doesn't resolve but http://127.0.0.1 does
wujibifan
Group: Member
Post Group: Newbie
Posts: 4
Status:
Forgot to include this info:

OS - Windows 7 Ultimate 64 bit

Ampps installed version 2.2 default installation with zero modifications.
IP: --   

localhost doesn't resolve but http://127.0.0.1 does
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

Do you want http://localhost to work or http://localhost.com ?


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

localhost doesn't resolve but http://127.0.0.1 does
wujibifan
Group: Member
Post Group: Newbie
Posts: 4
Status:
That's a question I never considered. I'm not sure because I don't understand the significance between the two in a testing environment.

I've been using Ampps exclusively as a testing server to develop/test websites for a couple of years and never considered your question before. I suppose all I need/want it to do is to be able to view a page with http://localhost/filename rather than http://127.0.0.1/filename.

Frankly, I can't recall if I ever used the dot com syntax on my localhost. Typically I just navigate to the file I want to view in the ampps/www folder and open it directly from there. Once I make the changes required locally,  sync the files with the live site using ftp.

I know that's a poor testament to my knowledge, but it's worked so far.

Any advice is welcome. Thanks for replying.
IP: --   

localhost doesn't resolve but http://127.0.0.1 does
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

Okay.

try putting,

Code
127.0.0.1 localhost


in hosts file, its located in C:/Windows/System32/drivers/etc/hosts


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

localhost doesn't resolve but http://127.0.0.1 does
wujibifan
Group: Member
Post Group: Newbie
Posts: 4
Status:
Brilliant. Worked perfectly.

Thanks a bunch, and have a good holiday.
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is May 24, 2024, 7:54 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:0.027