localhost:8080 i can't use it

Everytime I enter http://localhost:8080 I recieve the following message:

Safari can't connect to the server
Safari can’t open the page “ http://localhost:8080/” because it could not connect to the server “localhost”.

I can access http://localhost fine. I get the Apache successful instal page.
How do i use port 8080?

Posted on Oct 26, 2005 5:30 PM

Reply
4 replies

Oct 26, 2005 8:09 PM in response to Bruce Fulton

By default, the web server isn't listening on port 8080 -- just on port 80.
If you want it to listen on port 8080, you'll need to edit /etc/httpd/httpd.conf and restart Apache. This is fiddly. If you want to get at port 8080 from a different computer, you'll also have to disable your Firewall or add a service to it.

Why do you want to use 8080 instead of the default 80?

Oct 27, 2005 5:26 PM in response to Karl Zimmerman

I greatly appreciate your reply to my message. I have been stuck with this problem for a long time.

I am not an experienced programmer but I used to use ASP quite a bit to automate some things on my web site. I wanted to learn about JSP pages and experiment on my machine with it a bit. So I understand I need to install tomcat to do this. i followed instructions on various websites and eventually got to what i thought was a successful instal.

I got the following lines in the terminal window:
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/local/bin/java

this time with no error messages.
However everytime I open http://localhost:8080 I recieve the following message:

Safari can't connect to the server
Safari can’t open the page “ http://localhost:8080/” because it could not connect to the server “localhost”.

However if i just open http://localhost i get the apache "successful instal page"

I have tried various versions of tomcat, I have tried turning off my firewall, unplugging from the internet...I have no idea.

If you know anything about Installing Tomcat on Mac OS X and My Problem I would really appreciate the help.

Thanks Karl!

Oct 27, 2005 8:41 PM in response to Bruce Fulton

I'm afraid I've never done an install of Tomcat, although it's been on my "I should play with this sometime" list for a while.

A question: Is the Tomcat installation meant to contain its own web server, or do you intend to use it as part of the built-in Apache web server?

In order for Safari to be able to open http://localhost:8080/, some program (presumably a web server of some sort) needs to be listening on port 8080. The built-in Apache server by default listens only on port 80, the default HTTP port. The fact that opening http://localhost gets you the Apache "successful install" page indicates that the built-in Apache server is operating as expected; the fact that opening http://localhost:8080/ gets you the error indicates that no program is listening on port 8080.

Port 8080 is usually used when the person setting up a web server does not have administrative privileges on a machine, and so cannot configure the web server to run as root. Ports below 1024 may only be opened by root on a UNIX system, so the default http port, port 80, is off-limits to such a user.

Presumably, you have admin privileges on your PowerBook, so if you wanted, you could make Apache interface to Tomcat (or replace Apache with your preferred server front-end to Tomcat). Hence my question...

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

localhost:8080 i can't use it

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.