I can't see how that would work (and it doesn't seem to), because while
Apache points at the right app directory, any request coming into Tomcat
that doesn't match an explicit host name goes to the default host, and
thus to a different app ...

i.e., I need to duplicate a config I have in Resin that maps: 

*.somedomain.com --> app1
*.otherdomain.com --> app2
*.yetanotherdomain.com --> app3

In Tomcat I've setup:

x.somedomain.com --> app1

but I can't figure out how to route *.somedomain.com --> app1

Resin handles this simply with a wildcard or regexp host string...

thanks!




On Fri, 2004-07-16 at 05:49, Daniel J. Obregon wrote:
> What I'm thinking here is using a virtual host within an apache
> configuration file:
> 
> *** With apache 2 (not sure if it's in apache 1.3x) you can have
> virtual hosts defined in separate files and then include them in the
> main httpd.conf file by saying Include path/to/foo.conf.  Apache 1.3
> will let you include virtual hosts in the main httpd.conf file.
> 
> <VirtualHost 1.2.3.4:80>
>    DirectoryIndex index.html index.jsp index.php
>    ServerAdmin [EMAIL PROTECTED]
>    DocumentRoot /usr/local/tomcat/webapps/App1
>    ServerName foo.mydomain.com
>    ServerAlias bar.mydomain.com
>    ErrorLog logs/App1.error.log
>    CustomLog logs/App1.access.log common
> </VirtualHost>
> 
> <VirtualHost 1.2.3.4:80>
>    DirectoryIndex index.html index.jsp index.php
>    ServerAdmin [EMAIL PROTECTED]
>    DocumentRoot /usr/local/tomcat/webapps/App2
>    ServerName foo2.mydomain.com
>    ServerAlias bar2.mydomain.com
>    ErrorLog logs/App2.error.log
>    CustomLog logs/App2.access.log common
> </VirtualHost>
> 
> Again, this is just the approach I would take to map several domains to
> the webapps.  I know you said it was thousands, which is why i thought
> using a script to generate the virtual host config files would be a
> possible solution.
> 
> - Dan -
> 
> > On Thu, 2004-07-15 at 13:15, Daniel J. Obregon wrote:
> >> Have you considered using apache/mod_jk?
> >>
> >> If you are mapping thousands of domains to a few webapps, it might be
> >> better to use apache.  Then, *worst* case you can write a script to
> >> generate and/or maintain a set of virtual hosts....
> >
> > Actually, I am using Apache/mod_jk. How does that help me map domains to
> > particular webapps ?  I hope I'm missing something simple. ;)
> >
> > thanks!
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to