Sunday, November 29, 2009

Change default webapp in tomcat

- leave your war file in CATALINA_BASE/webapps, under its original name
- turn off autoDeploy and deployOnStartup in your Host element in the server.xml file.
- explicitly define all application Contexts in server.xml, specifying both path and docBase. You must do this, because you have disabled all the Tomcat auto-deploy mechanisms, and Tomcat will not deploy your applications anymore unless it finds their Context in the server.xml.

Note that this last method also implies that in order to make any change to any application, you will have to stop and restart Tomcat.

server.xml: Context path="" docBase="ihzh"

Friday, November 6, 2009

URL redirect

http://yost.com/computers/apache-redirect/index.html

Host multiple websites

http://wiki.gandi.net/en/hosting/using-linux/tutorials/ubuntu/virtualhosts