0

I have an old instance of tomcat5 running on RHEL5. It serves http://myserver/RTT from the files in /RTT/intranet/build, assume that means the target of ant from the directory /RTT/intranet.

In addition, there is an apache server but all the link entered in it are redirected to the Tomcat Server, regardless of the configuration of apache (Alias /my /home/my).

Where are located the configuration files? I found files in /etc/tomcat but I cannot grasp how server user port 80 instead of httpd deamon.

MUY Belgium
  • 251
  • 3
  • 17

1 Answers1

0

Both of the web servers cannot be listening on port 80 simultaneously!

Apache Tomcat Configuration is in TOMCAT_HOME/conf/server.xml.

There you can find, on HTTP Connectors, the ports Tomcat is listening, e.g. <Connector port="8080". (That being the default; Tomcat can also use AJP Connectors that are supported by Apache mod_proxy_ajp.)

If Apache is listening on 80, you probably have ProxyPass "/RTT" "http://localhost:8080/bar" or similar in your Apache configuration, using mod_proxy to forward the requests to Tomcat listening on different port.

If Tomcat is listening on 80, Tomcat's equivalent for "aliases" would be Context containers with attribute docBase, like <Context path="/RTT" docBase="/RTT/intranet/build".


Please notice that Apache Tomcat 5.5.x has been EOL since 30 September 2012 and – even with RHEL extremely long life cycle – RHEL5 Extended Update Support EUS has ended (depending on the minor release) during years 2010–2015. Please do not use EOL software. My answer still applies for currently supported versions, though.

Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129
  • The Server element does not control the port(s) Tomcat listens on for user agent connections. You should look at the Connector elements for that. In a reverse proxy configuration, httpd may be proxying using the HTTP or AJP protocols. These have different connector configurations but both have a port attribute. – Mark Thomas Apr 19 '17 at 20:11
  • Thanks for your assistance. That part should be corrected now. Since this is a single server environment, I suppose there aren't any Balancer Reverse Proxies involved and `ProxyPass` covers the situation. – Esa Jokinen Apr 19 '17 at 21:06