DevHeads.net

Httpd & Tomcat

Dear All

I am trying to run Httpd and Apache together for the first time ever,
however, I have been unsuccessful in my endeavours.

I have to sites that point to the same server:

subdomain1.domain.com - normal HTML & PHP site

subdomain2.domain.com - tomcat servlet with an instance of Atlassian
Confluence which connects to port 8090

In the HTTPD conf file I the following:

Listen: 80

#Listen: 8090

<Directory />

# AllowOverride none

# Require all denied

Options FollowSymLinks

Options Indexes FollowSymLinks Includes ExecCGI

AllowOverride All

Order deny,allow

Allow from all

</Directory>

ServerName: xxx.xxx.xxx.xxx

ServerName: xxx.xxx.xxx.xxx:8090

<VirtualHost xxx.xxx.xxx.xxx >

DocumentRoot "/www/html

ServerName subdomain1.domain.com

</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx:8090>

DocumentRoot "/opt/confluence/confluence"

ServerName subdomain2.domain.com

</VirtualHost>

I am able to get the normal site, but not the tomcat instance. Will it be
possible to point me in the right direction, please?

Kind Regards

Leon

Comments

Re: Httpd & Tomcat

By Bremser, Kurt (... at 04/17/2015 - 04:15

Tomcat uses several ports. One of these is a standard HTML port that can be usefully accessed with a browser. Since tomcat itself listens on this port, DO NOT USE it in httpd!

If you want to serve tomcat content via your apache(httpd), you need to use a connector (ie mod_jk) and specify the correct connector port in workers.properties. You can find the example for this in the mod_jk.conf in the conf/extra subdirectory of your apache tree.
The ports of tomcat can be found in conf/server.xml in the tomcat tree.

Kurt Bremser
AMOS Austria

Newton was wrong. There is no gravity. The Earth sucks.
Dear All

I am trying to run Httpd and Apache together for the first time ever, however, I have been unsuccessful in my endeavours.

I have to sites that point to the same server:

subdomain1.domain.com – normal HTML & PHP site
subdomain2.domain.com – tomcat servlet with an instance of Atlassian Confluence which connects to port 8090

In the HTTPD conf file I the following:

Listen: 80
#Listen: 8090

<Directory />
# AllowOverride none
# Require all denied

Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>

ServerName: xxx.xxx.xxx.xxx
ServerName: xxx.xxx.xxx.xxx:8090

<VirtualHost xxx.xxx.xxx.xxx >
DocumentRoot "/www/html
ServerName subdomain1.domain.com
</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx:8090>
DocumentRoot "/opt/confluence/confluence"
ServerName subdomain2.domain.com
</VirtualHost>

I am able to get the normal site, but not the tomcat instance. Will it be possible to point me in the right direction, please?

Kind Regards
Leon

AMOS Austria GmbH
1130 Wien, Hietzinger Kai 101-105
FN 365014k, Handelsgericht Wien
UID: ATU 66614737

<a href="http://www.allianz.at" title="http://www.allianz.at">http://www.allianz.at</a>

********************************************************
Dieses E-Mail und allfaellig daran angeschlossene Anhaenge
enthalten Informationen, die vertraulich und
ausschliesslich fuer den (die) bezeichneten Adressaten
bestimmt sind.
Wenn Sie nicht der genannte Adressat sind, darf dieses
E-Mail samt allfaelliger Anhaenge von Ihnen weder anderen
Personen zugaenglich gemacht noch in anderer Weise
verwertet werden.
Wenn Sie nicht der beabsichtigte Empfaenger sind, bitten
wir Sie, dieses E-Mail und saemtliche angeschlossene
Anhaenge zu loeschen.

Please note: This email and any files transmitted with it is
intended only for the named recipients and may contain
confidential and/or privileged information. If you are not the
intended recipient, please do not read, copy, use or disclose
the contents of this communication to others and notify the
sender immediately. Then please delete the email and any
copies of it. Thank you.
********************************************************

Re: Httpd & Tomcat

By James Smith at 04/17/2015 - 04:23

On 17/04/2015 09:15, Bremser, Kurt (AMOS Austria GmbH) wrote:

RE: Httpd & Tomcat

By Leon Vergottini at 04/17/2015 - 05:24

Hi

Thank you for the responses. I will investigate both solutions.

Everyone have a great weekend.

Kind Regards

Leon

Tomcat uses several ports. One of these is a standard HTML port that can be
usefully accessed with a browser. Since tomcat itself listens on this port,
DO NOT USE it in httpd!

If you want to serve tomcat content via your apache(httpd), you need to use
a connector (ie mod_jk) and specify the correct connector port in
workers.properties. You can find the example for this in the mod_jk.conf in
the conf/extra subdirectory of your apache tree.

The ports of tomcat can be found in conf/server.xml in the tomcat tree.

You can also use mod_proxy to do this as well - depending on the frequency
of connections you may find that the mod_proxy solution is better
- mod_jk isn't good at coping with network issues although this probably
isn't a problem in your case...

-- The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a company
registered in England with number 2742969, whose registered office is 215
Euston Road, London, NW1 2BE.