tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Zoetebier <john.zoeteb...@transparent.co.nz>
Subject Re: Virtual server document root mapping
Date Wed, 25 Dec 2002 01:37:35 GMT
Found a simple solution to virtual host root mapping.
For each virtual host in Apache configuration file define 1 webapp pointing to 
root path.
No changes required to server.xml Tomcat file !

For example:
<VirtualHost 192.168.1.10>
	ServerName banking.tsl010
	DocumentRoot /opt/jakarta/tomcat/webapps/banking
	DirectoryIndex login.jsp
	WebAppDeploy banking warpConnection /
</VirtualHost>

<VirtualHost 192.168.1.10>
	ServerName storefront.tsl010
	DocumentRoot /opt/jakarta/tomcat/webapps/storefront
	DirectoryIndex index.jsp
	WebAppDeploy storefront warpConnection /
</VirtualHost>

Now the webapps can be addressed with:
http://banking.tsl010
http://storefront.tsl010

Note: setup server names in DNS server or local hosts file

-- 
John Zoetebier

On Tuesday 24 December 2002 16:42, you wrote:
> How can I map more than 1 Apache virtual server to root url path ?
>
> The syntax for WebAppDeploy is:
> WebAppDeploy [application name] [connection name] [url path]
>
> For example I have 2 virtual web servers example1.com and example2.com
> Now I cannot use:
> WebAppDeploy example1 warp /
> WebAppDeploy example2 warp /
>
> Apache does not accept 2 servers on the same url path.
> As a consequence I have to enter in the browser:
> 1. http://example1.com/example1/index.html
> 2. http://example1.com/example2/index.html
>
> This is not very user friendly.
> Is there a way around this problem ?


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message