You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Fred Finn <fr...@gmail.com> on 2014/05/02 00:02:31 UTC

[users@httpd] Configuring two tomcat instances resolving to a directory on the same domain

Hi,

I'm trying to setup my httpd.conf to allow one domain, with two directories
to resolve to two different tomcat instances. But I've gotten a bit lost.
Any guidance will be so appreciated!!

www.example.com/first

<VirtualHost "ip address":80>
        ServerName example/first
        ErrorLog /var/log/httpd/first_error.log
        CustomLog /var/log/httpd/first_access.log combined

        <Proxy *>
                AddDefaultCharset off
                Order deny,allow
                Allow from all
        </Proxy>

        ProxyPass / ajp://localhost:8009/
        ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>


www.example.com/second

<VirtualHost "ip address":80>
        ServerName example/second
        ErrorLog /var/log/httpd/second_error.log
        CustomLog /var/log/httpd/second_access.log combined

        <Proxy *>
                AddDefaultCharset off
                Order deny,allow
                Allow from all
        </Proxy>

        ProxyPass / ajp://localhost:8010/
        ProxyPassReverse / ajp://localhost:8010/
</VirtualHost>

Re: [users@httpd] Configuring two tomcat instances resolving to a directory on the same domain

Posted by "Bremser, Kurt (AMOS Austria GmbH)" <Ku...@allianz.at>.
Hi!

Since you do have a worker for each tomcat instance, you just have to assign the paths to the correct worker in mod_jk.conf:

JkMount /path1 ajp13_1

JkMount /path2 ajp13_2

(or whatever your workers are named in workers.properties)

Kurt Bremser
AMOS Austria

Newton was wrong. There is no gravity. The Earth sucks.
________________________________
Von: Fred Finn [fred.finn@gmail.com]
Gesendet: Freitag, 2. Mai 2014 00:02
An: users@httpd.apache.org
Betreff: [users@httpd] Configuring two tomcat instances resolving to a directory on the same domain [wd-vc]

Hi,

I'm trying to setup my httpd.conf to allow one domain, with two directories to resolve to two different tomcat instances. But I've gotten a bit lost. Any guidance will be so appreciated!!

www.example.com/first<http://www.example.com/first>

<VirtualHost "ip address":80>
        ServerName example/first
        ErrorLog /var/log/httpd/first_error.log
        CustomLog /var/log/httpd/first_access.log combined

        <Proxy *>
                AddDefaultCharset off
                Order deny,allow
                Allow from all
        </Proxy>

        ProxyPass / ajp://localhost:8009/
        ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>


www.example.com/second<http://www.example.com/second>

<VirtualHost "ip address":80>
        ServerName example/second
        ErrorLog /var/log/httpd/second_error.log
        CustomLog /var/log/httpd/second_access.log combined

        <Proxy *>
                AddDefaultCharset off
                Order deny,allow
                Allow from all
        </Proxy>

        ProxyPass / ajp://localhost:8010/
        ProxyPassReverse / ajp://localhost:8010/
</VirtualHost>




AMOS Austria GmbH 
1130 Wien, Hietzinger Kai 101-105 
FN 365014k, Handelsgericht Wien 
UID: ATU 66614737 

http://www.allianz.at 

******************************************************** 
Dieses E-Mail und allfaellig daran angeschlossene Anhaenge 
enthalten Informationen, die vertraulich und 
ausschliesslich fuer den (die) bezeichneten Adressaten 
bestimmt sind. 
Wenn Sie nicht der genannte Adressat sind, darf dieses 
E-Mail samt allfaelliger Anhaenge von Ihnen weder anderen 
Personen zugaenglich gemacht noch in anderer Weise 
verwertet werden.
Wenn Sie nicht der beabsichtigte Empfaenger sind, bitten
wir Sie, dieses E-Mail und saemtliche angeschlossene
Anhaenge zu loeschen. 

Please note: This email and any files transmitted with it is 
intended only for the named recipients and may contain 
confidential and/or privileged information. If you are not the 
intended recipient, please do not read, copy, use or disclose 
the contents of this communication to others and notify the 
sender immediately. Then please delete the email and any 
copies of it. Thank you.
********************************************************

Re: [users@httpd] Configuring two tomcat instances resolving to a directory on the same domain

Posted by Fred Finn <fr...@gmail.com>.
Thank you!! I ended up getting this just 5 minutes ago, and then saw your
email!

Frederick Finn
http://www.fredfinn.com


On Tue, May 6, 2014 at 1:43 PM, Yehuda Katz <ye...@ymkatz.net> wrote:

> You should only need one vhost and it should look more like this:
>
> <VirtualHost "ip address":80>
>         ServerName example.com
>         ErrorLog /var/log/httpd/error.log
>         CustomLog /var/log/httpd/access.log combined
>
>         ProxyPass /first ajp://localhost:8009/
>         ProxyPassReverse /first ajp://localhost:8009/
>
>         ProxyPass /second ajp://localhost:8010/
>         ProxyPassReverse /second ajp://localhost:8010/
>
> </VirtualHost>
>
>
> - Y
>
>
> On Thu, May 1, 2014 at 6:02 PM, Fred Finn <fr...@gmail.com> wrote:
>
>> Hi,
>>
>> I'm trying to setup my httpd.conf to allow one domain, with two
>> directories to resolve to two different tomcat instances. But I've gotten a
>> bit lost. Any guidance will be so appreciated!!
>>
>> www.example.com/first
>>
>> <VirtualHost "ip address":80>
>>         ServerName example/first
>>         ErrorLog /var/log/httpd/first_error.log
>>         CustomLog /var/log/httpd/first_access.log combined
>>
>>         <Proxy *>
>>                 AddDefaultCharset off
>>                 Order deny,allow
>>                 Allow from all
>>         </Proxy>
>>
>>         ProxyPass / ajp://localhost:8009/
>>         ProxyPassReverse / ajp://localhost:8009/
>> </VirtualHost>
>>
>>
>> www.example.com/second
>>
>> <VirtualHost "ip address":80>
>>         ServerName example/second
>>         ErrorLog /var/log/httpd/second_error.log
>>         CustomLog /var/log/httpd/second_access.log combined
>>
>>         <Proxy *>
>>                 AddDefaultCharset off
>>                 Order deny,allow
>>                 Allow from all
>>         </Proxy>
>>
>>         ProxyPass / ajp://localhost:8010/
>>         ProxyPassReverse / ajp://localhost:8010/
>> </VirtualHost>
>>
>
>

Re: [users@httpd] Configuring two tomcat instances resolving to a directory on the same domain

Posted by Yehuda Katz <ye...@ymkatz.net>.
You should only need one vhost and it should look more like this:

<VirtualHost "ip address":80>
        ServerName example.com
        ErrorLog /var/log/httpd/error.log
        CustomLog /var/log/httpd/access.log combined

        ProxyPass /first ajp://localhost:8009/
        ProxyPassReverse /first ajp://localhost:8009/

        ProxyPass /second ajp://localhost:8010/
        ProxyPassReverse /second ajp://localhost:8010/

</VirtualHost>


- Y


On Thu, May 1, 2014 at 6:02 PM, Fred Finn <fr...@gmail.com> wrote:

> Hi,
>
> I'm trying to setup my httpd.conf to allow one domain, with two
> directories to resolve to two different tomcat instances. But I've gotten a
> bit lost. Any guidance will be so appreciated!!
>
> www.example.com/first
>
> <VirtualHost "ip address":80>
>         ServerName example/first
>         ErrorLog /var/log/httpd/first_error.log
>         CustomLog /var/log/httpd/first_access.log combined
>
>         <Proxy *>
>                 AddDefaultCharset off
>                 Order deny,allow
>                 Allow from all
>         </Proxy>
>
>         ProxyPass / ajp://localhost:8009/
>         ProxyPassReverse / ajp://localhost:8009/
> </VirtualHost>
>
>
> www.example.com/second
>
> <VirtualHost "ip address":80>
>         ServerName example/second
>         ErrorLog /var/log/httpd/second_error.log
>         CustomLog /var/log/httpd/second_access.log combined
>
>         <Proxy *>
>                 AddDefaultCharset off
>                 Order deny,allow
>                 Allow from all
>         </Proxy>
>
>         ProxyPass / ajp://localhost:8010/
>         ProxyPassReverse / ajp://localhost:8010/
> </VirtualHost>
>