OK, I have been struggling to get Apache and Tomcat to work together. It is a common thing to want, yet there is conflicting information on how to do it, and there is no preconfigured setup, which their should be for such a common task.
Anyway, what we did was:
Apache 2 w/ mod_jk and mod_php installed via YAST.
The tomcat version in the repos seem to be broken, so we downloaded a copy from apache and placed it in /home/tomcat/tomcat. Both work fine independently.
mod_jk doesn’t seem to be available even though it is installed. It is not on the module list in YAST http configuration.
Is there a tutorial out there that actually works? I can handle changing paths since we are using a proper tomcat version, but everything out there that I have found is old or flat out wrong.
I thought mod_jk had been replaced by mod_proxy and mod_ajp. It has from Apache 2.23 and up I believe.
You may have to compile mod_jk from source if you want to use it.
For mod_proxy and mod_ajp I have some install notes i made for a customer while on site but its for Sles 10 sp2. May help you out though.
1.2 Apache Installation
From the Sles 10 sp 2 server: (as root)
Launch Yast
Choose software
Choose software management
Search for apache
Select the following:
o apache2
o apache2-devel
o apache2-prefork
o libapr-util1
o libapr-util1-devel
o libapr1
o libapr1-devel
Select Ok and finish the installation
1.3 Apache Module Installation
The following configuration can be completed manually by editing the relevant text files,
however Yast simplifies this process. (Yast does also limit the possible configuration.)
Launch Yast
Select Network Services
Select HTTP server
Five Apache configuration screens will now be displayed in turn:
1/5 Click Next
2/5 Click Next
3/5 Click Next
4/5 Click Next
5/5 Choose HTTP server expert configuration
o Select Server Modules
Enable Proxy
Enable SSL
If proxy_ajp is not in the list then use the ‘add module’ option to add it.
Click Finish
Quit Yast
Once you have restarted apache
Open /etc/apache2/httpd.conf in an editor
Scroll to the bottom of the file and enter the following lines:
ProxyPass /IDM/ ajp://ipaddressoftomcat:8009