Solved

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

Posted on 2011-09-20
6
686 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:jandersonwidener
[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 333 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 167 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:jandersonwidener
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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:jandersonwidener
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 333 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:jandersonwidener
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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 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