Apache httpd

It is quite easy to configure the Apache httpd server (runing on port 80) and
Tomcat (port 8080) with the proxy mod. The advantages are that it allows
other technologies to run on same port, such as PHP, CGI, images serving,
download serving, etc..

Of course, you can use Tomcat on port 80; which will provide the greatest performance. This configuration requires the latest jahia fixes to run, but it is easier to setup.

For any information about proxy mode, please consult this page:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/proxy-howto.html

Here is a simple configuration example to run Apache httpd (80) using proxy
mod with tomcat (8080) for the virtual hosts www.jahia.com and
www.jahia.org. You will have to change this settings for your system.

Note: You can have javascript problems with Jahia 3.0 in the Jahia administration; This will be resolved with Jahia 3.1.

This example doesn't work with webapps.

########################################################################
# /etc/hosts:
127.0.0.1 www.jahia.com www.jahia.org localhost.localdomain localhost

########################################################################
# tomcat/conf/server.xml
# Note: dont't put any proxyName
# It is legal to omit the proxyName attribute from the

element. # If you do so, the value returned by request.getServerName() will by the host # name on which Tomcat is running.



########################################################################
# /etc/httpd/conf/httpd.conf
...
LoadModule proxy_module modules/libproxy.so
AddModule mod_proxy.c
...
NameVirtualHost *

ServerAdmin sysadmin@jahia.com ServerName www.jahia.com Redirect /index.html http://www.jahia.com/Jahia/site/jahia_com DocumentRoot /var/www/html RewriteEngine On RewriteRule ^/Jahia(.*)$ /jahia/Jahia$1 [P] ProxyPass /jahia http://www.jahia.com:8080/jahia ProxyPassReverse /jahia http://www.jahia.com:8080/jahia


ServerAdmin sysadmin@jahia.org ServerName www.jahia.org Redirect /index.html http://www.jahia.org/Jahia/site/jahia_org DocumentRoot /var/www/html RewriteEngine On RewriteRule ^/Jahia(.*)$ /jahia/Jahia$1 [P] ProxyPass /jahia http://www.jahia.org:8080/jahia ProxyPassReverse /jahia http://www.jahia.org:8080/jahia


########################################################################
# jahia.properties
# Remove all http://myserver:port that should exist after a standard jahia
install

jahiaHostHttpPath =
jahiaCoreHttpPath = /jahia/Jahia
jahiaTemplatesHttpPath = /jahia/jsp/jahia/templates/
jahiaEnginesHttpPath = /jahia/jsp/jahia/engines/
jahiaJavaScriptHttpPath = /jahia/jsp/jahia/javascript/jahia.js
########################################################################
# -- end of configuration example