How to hook confluence up to Apache on port 80?
- Some folks have said they don't bother with mod_jk and use a proxy pass through:
proxypass solution
, more here: Apache VirtualHosts
- virtual apache server for "wiki.tucson-jug.org"... and config files similar to below to hand off to Tomcat.
Additions to httpd.conf
# Include mod_jk configuration file Include conf/mod_jk.conf
mod_jk.conf
# Load mod_jk module # Update this path to match your modules location LoadModule jk_module modules/mod_jk.so <IfModule mod_jk.c> # Where to find workers.properties # Update this path to match your conf directory location (put workers.properties next to httpd.conf) JkWorkersFile /path/to/workers.properties # Where to put jk logs # Update this path to match your logs directory location (put mod_jk.log next to access_log) JkLogFile /path/to/logs/mod_jk.log # 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" </IfModule> # Send requests to workers JkMount /jira/* tomcat1 JkMount /jira tomcat1 JkMount /confluence/* tomcat2 JkMount /confluence tomcat2 JkMount /jsp-examples/* tomcat1 JkMount /jsp-examples tomcat1 JkMount /servlets-examples/* tomcat2 JkMount /servlets-examples tomcat2
workers.properties
# Define 1 real worker using ajp13 worker.list=tomcat1,tomcat2 # Set properties for worker1 (ajp13) worker.tomcat1.type=ajp13 worker.tomcat1.host=localhost worker.tomcat1.port=9071 worker.tomcat1.lbfactor=50 worker.tomcat1.cachesize=10 worker.tomcat1.cache_timeout=600 worker.tomcat1.socket_keepalive=1 worker.tomcat1.reclycle_timeout=300 # Set properties for worker2 (ajp13) worker.tomcat2.type=ajp13 worker.tomcat2.host=localhost worker.tomcat2.port=9072 worker.tomcat2.lbfactor=50 worker.tomcat2.cachesize=10 worker.tomcat2.cache_timeout=600 worker.tomcat2.socket_keepalive=1 worker.tomcat2.reclycle_timeout=300
Minimal Tomcat server.xml for tomcat1
<Server port="9091" shutdown="SHUTDOWN"> <Service name="Catalina"> <Connector port="9071" protocol="AJP/1.3" /> <Connector port="9081" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" /> <Engine name="Catalina" defaultHost="localhost"> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> </Host> </Engine> </Service> </Server>