Re: [users@httpd] Virtual Host Configuration Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>


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




---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux