Apache + Tomcat, door problem...

Hey folks here is the thing, i have both apache and tomcat services running, both in their standard doors (tomcat 8080, httpd 80). I need to setup tomcat to run on door 80 instead of httpd. I changed httpd door with success to 8180. Now i want to change tomcat6 door to 80, and i did that by editing server.xml config file of tomcat. After restarting tomcat, the system tells me it’s ok, but i can see that it’s not running on 80, nor at any other door. A simple nmap search confirm that.

What should i do to have tomcat running in door 80?

Thanks!

You should look at the log files of tomcat to see why your change didn’t work. Also you have to run tomcat as root. I think the standard configuration runs it as a tomcat user.

It might be easier to leave tomcat along and use apache to forward requests to tomcat. There are various ways to do this.

By the way, it’s called a port. Perhaps you are thinking that it translates to door because it sounds like porta.

Can you please advice me the best way to do this forwarding?

Thanks a lot!

One way is to use Apache’s ProxyPass feature. See for example here:

Configuring the Software

There are lots of similar howtos on the Net, look for more if this isn’t enough information.

I am very thankful for you reply, but i find no mod_proxy.c into my openSuse system, nor the ifmodule for the mod_proxy inside the httpd.conf file. In fact, there are more than one httpd.conf file:

lar1:/home/fabio # find / -name httpd.conf
/etc/apache2/httpd.conf
/usr/share/doc/packages/apache2/original/httpd.conf
/usr/share/susehelp/httpd.conf

In the second result listed above i have ifmodule conditions, but, no commented mod_proxy…

Do you have any clue why?

Thanks again…

You don’t edit the LoadModule lines manually. What you do is add proxy to APACHE_MODULES in /etc/sysconfig/apache2 to enable it. This can also be done in YaST. mod_proxy.so is part of the core Apache package so you don’t need to install anything else, only to enable it.

(That HOWTO is quite old so don’t believe everything it says, a lot of it is not relevant. The main thing is to understand the use of the ProxyPass and the ProxyReversePass directives.)