Hi there,Here is what I've done on Centos to integrate Apache and Tomcat. I use this for most of my production environments as I prefer Apache in front of Tomcat. These instructions should apply to Ubuntu, however paths may vary slightly.First of all, if your using the Tomcat bundled with Alfresco - you'll need to enable the AJP/13 listener. AJP is the protocol that mod_jk (now mod_proxy_ajp in 2.2) uses to talk to Tomcat. Its more or less HTTP with binary headers :-).So … lets assume you've installed Alfresco into /opt/alfresco. Modify the file /opt/alfresco/tomcat/conf/server.xml and include the following block:
<Service name="Catalina">
…
<!– Define an AJP 1.3 Connector on port 8009 –>
<Connector port="8009"
enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
…
</Service>
Then restart Alfresco. AJP should now be working on port 8009. You can test this quite easily:
# telnet 0 8009
Trying 0.0.0.0…
Connected to 0 (0.0.0.0).
Escape character is '^]'.
^]
If you get the Connected message - your in business.Now you need to configure Apache by adding a new virtualhost to the end of your configuration file httpd.conf. My Apache configuration is located in /etc/httpd/conf/httpd.conf.
<VirtualHost *:80>
ServerName alfresco.mydomain.net
RewriteEngine on
RewriteRule ^/alfresco(.*) ajp://127.0.0.1:8009/alfresco$1 [P,L]
</VirtualHost>
The magic here is the RewriteRule combined with the [P] option at the end. This uses mod_proxy_ajp to connect to the AJP provider on localhost (ie. Alfresco's tomcat).Now you should be able to restart Apache - and connect to your web server using the name you have specified in ServerName above. I very highly recommend running your Apache in threaded mode, that way your AJP connections get pooled. In pre-fork mode … Apache creates an AJP connection per process which is not quite as efficient - especially under high load. I'm not 100% on the "correct" way to do this for Ubuntu.If you have problems - check your error_log output from Apache (for me its in /var/log/httpd/error_log). You may find the mod_proxy_ajp modules needs to be loaded. If you get an error, you can include this configuration in your httpd.conf (probably best to put this outside your VirtualHost configuration):
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
> I tried using mod_jk but that doesnt seem to work. When I type the web address, all I get is a directory listing of my alfresco directory. The jsp pages dont show up.Most odd … perhaps try the configuration above and let us know how you get on.ken.