Can no longer access localhost with IP.

Hi Experts,

I used to be able to access my localhost via http://localhost or http://mylocalip

Recently I changed my router with my Internet company, but made sure that I set my IP to Reserved, and when I do ipconfig, I use the correct IP address that I was using, but I cannot access my localhost anymore with my IP.

I am not sure if this happened with my router change, or something else, but I would appreciate any help.
APD TorontoSoftware DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

timgreen7077Exchange EngineerCommented:
In the cmd prompt type IPCONFIG, and see what the IP address of your local host is showing. If your local host has a DHCP address then it might have changed with the new router, but if it's a static address then it will remain the same.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
APD TorontoSoftware DeveloperAuthor Commented:
In the new router I set it to reserved, then I checked ipconfig it shows the proper IP.

I am not sure what you mean re DHCP, I am not a network person.
timgreen7077Exchange EngineerCommented:
what is the local host you are referring to? Is it a computer or router or what?
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

APD TorontoSoftware DeveloperAuthor Commented:
localhost is a computer
timgreen7077Exchange EngineerCommented:
Ok, so what are you attempting to access using http://localhost or http://mylocalip, do you have an IIS server running on the computer or anything? This will not show you anything unless you have some type of web service running.
Martin MillerCTOCommented:
Can check your hosts file, and confirm you have a localhost entry pointing to

Note: is known as a loopback address, to yourself.
Agree with Martin, you should check your host file.  It doesn't make sense for localhost to not work by changing the router.

" used to be able to access my localhost via http://localhost"

There is a difference being able to communicate with localhost and accessing localhost via http.  

First, ensure you can ping localhost and get a reply.  If you do get a reply then the problem is with the HTTP service/server.  Make sure the we service and website is running.

If you don't get a reply then the problem should be with the host file as stated above.
APD TorontoSoftware DeveloperAuthor Commented:
Below is my hosts file, and I uncommented the last 2 lines, but still I cannot access

http://localhost and work.

The reason why I need is because I am a web developer and need to test from different devices. This used to work up until 2 weeks ago.

# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
#          # source server
#              # x client host

# localhost name resolution is handled within DNS itself.       localhost
	::1             localhost

Open in new window

APD TorontoSoftware DeveloperAuthor Commented:
It was my Avast Firewall

Thank you!
Glad you got it solved and thanks for getting back.  Cheers!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.