Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Virtual Server Hosting

 
Patrick McDonogh
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I am trying to get www.icsmarts.co.uk to map to a web application running on tomcat. I am aware that i need to get virtual hosting working on tomcat to do this.

I have a icsmarts.war file that holds the application.

Here are the steps i have done.

1) Copied the icsmarts.war file to $CATALINA_HOME/webapps

2) I then added a host entry into the Catalina engine tag in the server.xml file. i.e.
<Engine name="Catalina" defaultHost="localhost">
...
<Host name="www.icsmarts.co.uk" appBase="webapps/icsmarts"/>
...
</Engine>

3) Created the directory mkdir $CATALINA_HOME/conf/Catalina/www.icsmarts.co.uk

4) Created a blank file called ROOT.xml in $CATALINA_HOME/conf/Catalina/www.icsmarts.co.uk/ROOT.xml

5) I then copied the manager.xml file from $CATALINA_HOME/conf/Catalina/localhost

This is all.

I then start tomcat but it complains that the ROOT.xml file is empty.

Does anyone know what i should insert into this ROOT.xml file as i cannot find this in the tomcat documentation?

Also does what i am doing look right so that when a user visits www.icsmarts.co.uk they see the website?

I greatly appreciate any help on this.

Have a good day.

Pat
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I run 7 virtual hosts on one Tomcat 5.5.9. Your appBase needs to be an absolute file system path to the directory, NOT a relative one.



The appBase directory should then contain a ROOT subdirectory where you place your welcome file such as index.html.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic