Solved

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

Posted on 2011-09-20
6
682 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

895 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

12 Experts available now in Live!

Get 1:1 Help Now