HowTos/Apache
From Scalix Wiki
Revision as of 14:23, 5 April 2006 by Mcp (Talk | contribs) (→Integrate Apache with Tomcat using mod_jk)
Integrate Apache with Tomcat using mod_jk
- For debian, create the following file /etc/apache2/conf.d/scalix-jk-common.conf as per file below:
# # Scalix JK connector configuration # (file common to all platforms) # # Setup JK connector needed to run Tomcat under Apache server: <IfModule mod_jk.c> # Set the jk log level [debug/error/info] JkLogLevel info # Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat "%w %V %T" # Send everything for context /examples to worker named worker1 (ajp13) JkMount /webmail* worker1 JkMount /sac* worker1 JkMount /caa* worker1 JkMount /webcal* worker1 JkMount /res* worker1 # workers.properties content: # Define 1 real worker using ajp13 JkWorkerProperty worker.list=worker1 # Set properties for worker1 (ajp13) JkWorkerProperty worker.worker1.type=ajp13 JkWorkerProperty worker.worker1.host=localhost JkWorkerProperty worker.worker1.port=8009 JkWorkerProperty worker.worker1.lbfactor=50 JkWorkerProperty worker.worker1.cachesize=10 JkWorkerProperty worker.worker1.cache_timeout=600 JkWorkerProperty worker.worker1.socket_keepalive=1 JkWorkerProperty worker.worker1.reclycle_timeout=300 </IfModule>
- Next create the following file /etc/apache2/conf.d/scalix-jk-debian.conf as per file below:
# # Scalix JK connector configuration # (file specific to Debian platforms) # <IfModule mod_jk.c> # Where to put jk logs JkLogFile /var/log/apache2/mod_jk.log </IfModule>
- Next you should disable port 8080 in Tomcat (optional but recommended):
- edit the file /opt/scalix-tomcat/conf/server.xml:
- comment out the line that starts with '<Connector port="8080"...' using XML style comments
- edit the file /etc/opt/scalix/res/config/res.properties:
- change 'res.tomcat.tcp.port=8080' to match your Apache port number (default is 80)
- Then restart Tomcat with /etc/init.d/scalix-tomcat restart
- Also restart Scalix with /etc/init.d/scalix restart
- Finally restart Apache2 with /etc/init.d/apache2 restart
- For redhat, more to come ;)
Integrate On-The-Fly compression in Apache using mod_deflate
- For debian, create the following file /etc/apache2/conf.d/scalix-deflate.conf as per file below:
# Configure on-the-fly deflate compression of the pages: <Location /> AddOutputFilterByType DEFLATE text/xml text/html text/css AddOutputFilterByType DEFLATE application/x-javascript </Location>
- Then enable deflate module with: /usr/sbin/a2enmod deflate
- Then restart Apache2 with /etc/init.d/apache2 restart