Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification.
The "CreateVirtualHosts" page has been changed by KonstantinKolinko: http://wiki.apache.org/tomcat/CreateVirtualHosts?action=diff&rev1=6&rev2=7 Comment: Add ${catalina.base} references If you want tomcat to accept requests for different hosts e.g., www.myhostname.com then you must - 0. create ${catalina.home}/www/appBase , ${catalina.home}/www/deploy, + 0. create ${catalina.base}/www/appBase , ${catalina.base}/www/deploy, - and ${catalina.home}/conf/Catalina/www.myhostname.com + and ${catalina.base}/conf/Catalina/www.myhostname.com 1. add a host entry in the server.xml file {{{ @@ -15, +15 @@ 2. Create the the following file under conf/Catalina/www.myhostname.com/ROOT.xml {{{ <?xml version="1.0" encoding="UTF-8"?> - <Context docBase="www/deploy/mywebapp.war"> + <Context docBase="${catalina.base}/www/deploy/mywebapp.war"> </Context> }}} Add any parameters specific to this hosts webapp to this context file - 3. put your war file in ${catalina.home}/www/deploy + 3. put your war file in ${catalina.base}/www/deploy - When tomcat starts, it finds the host entry, then looks for any context files and will start any apps with a context + When tomcat starts, it finds the host entry, then looks for any context files and will start any apps with a context. - To add more sites just repeat and rinse, all webapps can share the same war file location and appbase + To add more sites just repeat and rinse, all webapps can share the same war file location and appbase. ---- [[CategoryFAQ]] --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org