Solved

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

Posted on 2011-09-20
6
679 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
  • 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now