The daisy installation comes bundled with Jetty as servlet engine. The
daisywiki frontend runs as web application inside Jetty which listens on port
8888 by default. If you are interested in running the daisywiki frontend on port
80, you may put the Apache webserver in front of daisy. Doing so is described in
detail at:
http://cocoondev.org/daisydocs-1_5/admin/99.html
The solution proposed there makes use of the apache module mod_proxy in order to
forward requests from apache to the jetty servlet engine.
Alternatively, you may use the apache module mod_jk for that
purpose. By doing so, you make use of an internal connector, thus not exposing
any jetty port to the outside.
Doing so is fairly easy:
Add the following lines to the configuration file of your webserver, this will load the mod_jk module and will set some configuration parameters:
<IfModule !mod_jk.c>
LoadModule jk_module modules/mod_jk.so
</IfModule>
<IfModule mod_jk.c>
JkWorkersFile "conf/worker.properties"
JkLogFile "logs/mod_jk.log"
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat
</IfModule>
In the configuration directory of your apache webserver, create a new file called worker.properties, containing the following lines:
worker.list=jetty worker.jetty.port=8007 worker.jetty.host=dns or ip of your host worker.jetty.type=ajp13 worker.jetty.lbfactor=1
Edit the file $DAISY_HOME/daisywiki/conf/jetty-daisywiki.xml and replace the http Socket Listener with an AJP13-Listener. The file should look like:
<Configure class="org.mortbay.jetty.Server">
<Call name="addListener">
<Arg>
<New class="org.mortbay.http.ajp.AJP13Listener">
<Set name="port">8007</Set>
</New>
</Arg>
</Call>
<Call name="addWebApplication">
<Arg>/</Arg>
<Arg><SystemProperty name="daisywiki.home"/>/webapp</Arg>
<Set name="defaultsDescriptor"><SystemProperty name="daisywiki.home"/>/conf/jetty-daisywiki-defaults.xml</Set>
</Call>
</Configure>
Inside your httd.conf, edit the virtual host section that belongs to your daisy installation. Use the JkMount command in order to pass all request through to the jetty servlet engine:
<VirtualHost your.host.com:*>
ServerName your.host.com
ServerAdmin serveradmin@your.host.com
## you may add further entries concerning log-files, log-level, URL-rewriting, ...
## pass requests through to jetty worker
JkMount /* jetty
</VirtualHost>
Restart both Jetty and your apache webserver, thus the changes will take effect.
| Name | Value |
|---|---|
| Category | Install & config |