You are here
Tomcat on Apache
Serving up a different web root (not the control panel)
The default web root redirects to the TurnKey control panel. To change that, there is difference between Turnkey version.
Version 14.2 and higher
You can change that by deleting or replacing this Javascript code which written on index.html (located at var/www/ by default):
window.location = "/cp"
Lower than version 14.2
You can change that by either:
- Configuring a virtual host at the Apache-level via Webmin
- Changing the mod_jk configuration by editing /etc/tomcat6/mod_jk.conf.
Replace:
RedirectMatch ^/$ /cp
With:
RedirectMatch ^/$ /index.html
Configuring mod_jk to serve applets
For example let's say you want to install Apache Axis:
For example, if axis is located in the webapps directory, you would add something like the following to the mod_jk configuration in /etc/tomcat6/mod_jk.conf:
JkMount /axis ajp13_worker JkMount /axis/* ajp13_worker
When you browse to http://appliance_ip/axis it would be proxied back to tomcat via apache. If you would like to have axis served at the webroot (well, redirected from webroot), you can implement a redirect like:
RedirectMatch ^/$ /axis JkMount /axis ajp13_worker JkMount /axis/* ajp13_worker
Please note that you will have to remove the welcome redirectmatch.
For more information on mod_jk, take a look at the Apache Tomcat Connectors documentation