File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Virtual Server Hosting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Virtual Server Hosting" Watch "Virtual Server Hosting" New topic
Author

Virtual Server Hosting

Patrick McDonogh
Ranch Hand

Joined: Oct 13, 2005
Posts: 89
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

Joined: Mar 22, 2000
Posts: 12761
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Virtual Server Hosting
 
Similar Threads
Virtual host apps reload localhost app
What is Tomcat virtual host, What is different from the Apache Tomcat?
Probelm with creating virtual hosting with tomcat
Different webapps on same instance of tomcat on different ports
How to change virtual host from http://localhost/test to http://www.fakedomain.com/?