tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: tomcat 6 virtual hosting vs apache virtual hosting
Date Tue, 04 Sep 2012 21:00:05 GMT
Charles Richard wrote:
> Hi,
> 
> I've started a new job where the last sysadmin has the virtual hosting
> configured in Tomcat (and Apache).  I'm used to only doing virtual hosting
> with Apache.
> 
> What are the pros and cons of each method?  I'm trying to understand why
> that would be needed.
> 
To answer about your case in particular is very difficult, as we do not know anything 
about the applications which you are running under Tomcat.

We also don't know if your Apache is a front-end for your Tomcat, or if both receive 
requests independently from eachother.

The prudent thing to do would be to assume that the previous guy probably knew what he was

doing, and that there is a reason for such a setup.

If Apache is a front-end for Tomcat, and requests for one Apache virtual host are being 
forwarded to a corresponding virtual host under Tomcat, it could be because :
- there are several virtual hosts under Tomcat, and the applications which run under each

virtual host are somehow different
- and/or the Tomcat application needs to know via which virtual host it was accessed, 
maybe to react differently in each case (may be linked to user authentication e.g.)

The only "con" I can think of, at the Tomcat level, is additional configuration 
complexity, if the virtual hosts are not really necessary at the Tomcat level.  It will 
not have any significant impact on performance (other than using perhaps additional memory).
On the other hand, if each virtual host corresponds to a separate group of users, then a 
"pro" would be that having several Hosts would allow you to stop/start/update their 
applications independently of eachother (even if they are basically the same apps).


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message