httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Diona Kidd" <dk...@modernflow.com>
Subject Re: [users@httpd] Virtual Host Configuration Question
Date Thu, 16 Feb 2006 21:52:20 GMT
James,

I'm not very familiar with Tomcat since I don't run it myself. With your
vhost setup, try setting the server name like below and rewriting to
localhost, the port number and /app*/.

Not sure about the JkMount...but perhaps this input point you in a direction.

<VirtualHost *:80>
     ServerName app1.foo.bar
     DocumentRoot ... tomcat web app directory ...
     RewriteEngine on
     RewriteRule   ^/$  http://localhost:8280/app1/$1
     JkMount /app1 tomcat1
     JkMount /app1/* tomcat1
</virtualHost>


James Howe wrote:
> I'm trying to configure an Apache 2.x installation to use two virtual
> hosts using name based virtual host definitions.  I have Tomcat 5.x
> running two different web applications and I want to map particular server
> names to particular web apps.  For example, if I were talking to Tomcat
> directly I would do this:
>
> http://localhost:8280/app1/*
>
> and
>
> http://localhost:8280/app2/*
>
> What I want to do is configure Apache so the URL's would look like this:
>
> http://app1.foo.bar/*  (where * may be nothing, or some path supported by
> the app)
>
> and
>
> http://app2.foo.bar/* (where * may be nothing, or some path supported by
> the app)
>
> The closest thing that works for me are the following URLs:
>
> http://app1.foo.bar/app1/*
>
> and
>
> http://app2.foo.bar/app2/*
>
> I'm using mod_jk to to the connection between Apache and Tomcat.  My
> virtual host configurations look something like this:
>
> <VirtualHost *:80>
>      ServerName app1
>      DocumentRoot ... tomcat web app directory ...
>      RewriteEngine on
>      RewriteRule   ^/$  /app1
>      JkMount /app1 tomcat1
>      JkMount /app1/* tomcat1
> </virtualHost>
>
> What am I missing?
>
> Any help would be appreciated.
>
> Thanks!
>
> --
> James Howe
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
Modern Flow Technology Solutions
http://www.modernflow.com
Office: 704.347.2886
dkidd@modernflow.com




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message