Sunday, 22 May 2011

Configure Apache Tomcat Hosts in server.xml

Backup server.xml
Before we start editing this file, let’s make a copy :)
cd /usr/share/apache-tomcat-7.0.12/conf
cp server.xml server.xml.backup

Edit server.xml and insert a new Host
vi server.xml (and add the code below after last Host)
<Host name="" appBase="/usr/share/apache-tomcat-7.0.12/webapps/">
<Context path="" reloadable="true" docBase="/usr/share/apache-tomcat-7.0.12/webapps/" debug="1" />
<Context path="/manager" debug="0" privileged="true" docBase="/usr/share/apache-tomcat-7.0.12/webapps/manager">

Test your Host
cd /usr/share/apache-tomcat-7.0.12/bin

If Tomcat is running again then the syntax is good and the files exist.

No comments:

Post a Comment