OT on Tomcat and Apache

C

ccc31807

Not totally OT, but close.

Building a new CGI with Perl and mod_perl, I was given a Windows
server that runs (and is running) Tomcat. Rather than configuring
Tomcat to run CGI, I installed Apache 2.2.11, but when I started
Apache I got the following error message:

<error>
(OS 10048)Only one usage of each socket address (protocol/network
address/port)
is normally permitted. : make_sock: could not bind to address
0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Note the errors or messages above, and press the <ESC> key to exit.
</error>

Can I run both Apache and Tomcat on port 80? This machine runs JSP
apps so they need Tomcat.

Does anyone have any experience running Perl scripts with Tomcat?

Where can I get help?

Thanks, CC.
 
P

Peter J. Holzer

No, only one thing at a time can run on port 80.

That's not quite correct: They can both listen on port 80, *iff* they
listen on different IP addresses. So you could have Tomcat on
192.0.2.1:80 and Apache on 192.0.2.2:80.
That's what the error message is telling you. If you'll think about
it, it makes perfect sense. Assume the machine let you run both
Tomcat and Apache on port 80. In comes a connection request for port
80 from another machine. Who answers: Apache or Tomcat? There is
absolutely no way to tell.

Right. Either the IP address or the port number has to differ.

If you need Apache and Tomcat for the same website, the normal way is
let Apache listen on port 80 and pass requests to Tomcat via mod_jk.
Using a reverse proxy should work, too.

hp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top