I’m trying to connect to localhost
through my browser to learn some Apache Tomcat stuff.
When I tried to connect to localhost through Firefox, I couldn’t; when I tried through Internet Explorer, I could the first time, but not after that.
I’m using Windows 7, and changed the hosts file to point localhost to 127.0.0.1
. I can successfully ping localhost and 127.0.0.1
.
I have tried turning off my antivirus and my Windows Firewall, but to no avail.
What am I doing wrong?
Best Answer
Your problem comes from your Tomcat and Apache configurations.
When you type in
localhost
into Internet Explorer, it automatically suposes you're connecting to port 80.You’re going to have to make sure that Apache is correctly configured to work with Tomcat.
You can also try out your tomcat server by connecting to:
That is, add the port number you’ve configured TomCat for after a colon… Try
http://localhost:8080
for a start.