?
Solved

How do you install Tomcat7 over top of Apache2.2.3 on RHEL Linux 2.6.18

Posted on 2011-09-20
6
Medium Priority
?
694 Views
Last Modified: 2012-06-27
Hi all
Im on RHEL Linux 2.6.18

how do you install Tomcat over top of Apache ?

isnt there some sort of connector or something ?
what all do I need for https ?

how do you tell if all thats working ? even though I have tomcat7, apache httpd many modules and things all installed, I still cannot get everything to work right .. I must be missing something since Im all by my lonesome on this. any insight is much appreciated.

If I do the JK connector when I try a ./configure I then get I first need apsx ??!?! whats that ? Im lost please help
0
Comment
Question by:JAaron Anderson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 2

Accepted Solution

by:
Anthropomorphic_Personification earned 1332 total points
ID: 36573010
It sounds like you are trying to compile the mod_jk connector.  You shouldn't really need this as proxy_ajp should be build into the RHEL package of apache.  I still use mod_jk in a handful of applications but mostly I use proxy_ajp.

Tomcat should be listening for connections in a default configuration, http requests on port 8080.  Can you connect to your tomcat on port 8080 from a web browser?
The other is the AJP port (Apache JServer Protocol), this normally is on port 8009 and is the connection made by either proxy_ajp or mod_jk.

There are many pages on using proxy_ajp a quick google gave me this one:
http://www.zeitoun.net/articles/configure-mod_proxy_ajp-with-tomcat/start

Anyway if you still want to compile a mod_jk module for your apache  then apxs is part of apache, if you are using a RHEL package then it would  be in the httpd-devel package.  So install that and it will be put somewhere lick /usr/sbin/apxs






0
 
LVL 3

Assisted Solution

by:RitBit
RitBit earned 668 total points
ID: 36573022
Normally tomcat lives next to apache but just listens to other ports.

There are two options here, either you:

- Stop apache and reconfigure Tomcat to listen to port 80 /443 (http/https)
or
- Use apache as a reversed proxy to Tomcat (most common).

For the latter you need to activate the proxy-functionality as well as a special tomcat module:  mod_proxy_ajp.  You can now forward any url towards the tomcat server on its own ports and benefit form the options apache provides.

Shout if you need more detailed help.
0
 

Author Comment

by:JAaron Anderson
ID: 36574273
@Anthropomorp... ::.
>>Can you connect to your tomcat on port 8080 from a web browser?
http://localhost:8080/my webapps/ dir /  is working yes
>> 8009
Server not found error
>>then apxs is part of apache
how do I tell ? I did a find / -name *apxs* and it returns nothing...

0
More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

 

Author Comment

by:JAaron Anderson
ID: 36574337
@RitBit ::.
>>Shout if you need more detailed help.
Thanks since RHEL is on a private network not able to see the Cloud, I simply cannot just go get a httpd-devel package Ill have to find where to download it and ISO it to share in my virtual VM slice.
...
>>reconfigure Tomcat to listen to port 80 /443
how would I go about trying that?
I believe my current LIVE production platform uses Apache as a reverse proxy sine web connectors ARE installed Im told but I dont know for sure... how can I tell that ?

thanks guys for the support!
0
 
LVL 2

Assisted Solution

by:Anthropomorphic_Personification
Anthropomorphic_Personification earned 1332 total points
ID: 36574428
Port 8009 is the default port for tomcat to listen to AJP on but it could be commented out or changed.  Under your tomcat configuration directory there should be a file "server.xml"  search in here until you find the AJP port line, this would look something like:

    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

If that line is there it should be open when tomcat starts up.  This would be required to use either mod_jk or proxy_ajp.
The server.xml file also has information for what port to listen for normal HTTP connections (the 8080 port).  

apxs may not be installed, in the RHEL packages it is part of the httpd-devel package.  Are you using the rpm packages for apache or is it installed from a tarball package.

rpm -qa|grep http

Will tell you what http packages are installed.
0
 

Author Comment

by:JAaron Anderson
ID: 36574897
ok I figured things out...
I dont get my error any more..
I had to add a ip route command and flush my iptables
and things work now for me
guess I dont need to broker any more modules
thx
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
Fine Tune your automatic Updates for Ubuntu / Debian
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question