Via Lattanzio,23 Milano
+39 02 36592025

Tomcat virtual host

Tomcat virtual host

This mini howto to show how to configure a virtual host on tomcat.
This use HTTP 1.1 feature so with one single IP and one single Tomcat server you can virtually host infinite domains.

Edit the file %TOMCAT_HOME%/conf/server.xml

Under the tag host (the one setted by default for localhost) add the following line:

Obviously you have to change change the [squared] value respectively with the domain of the site and with the directory where there are the web application files.

apparently one of 2 sites doesn’t work with the settings above. A working version look like this:


Lascia un commento