httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmed Dini <asd...@hotmail.com>
Subject Re: [users@httpd] serving multiple application servers under one domain name.
Date Tue, 05 May 2009 08:12:46 GMT



awarnier wrote:
> 
> Ahmedkafi wrote:
>> 
>> Hello everybody,
>> 
>> I have one domain name (www.example.com).
>> 
>> I also have 3 different application all running under their own tomcat
>> instances. (each application has its own tomcat).
>> 
>> All 3 instance of tomcat use Apache Server for accepting requests.
>> 
>> In httpd.conf Each tomcat instance has a corresponding virtual host.
>> 
>> Everything works fine if I use different domain name for each Virtual
>> host
>> for exampel :
>> <VirtualHost *:443>
>>     ServerName example.com
>> </VirtualHost>
>> 
>> <VirtualHost *:443>
>>     ServerName anotherexample.com
>> </VirtualHost>
>> <VirtualHost *:443>
>>     ServerName lastexample.com
>> </VirtualHost>
>> 
>> but what I want to have one domain name www.example.com to serve all
>> three
>> applications. for example something like:
>> 
>> <VirtualHost *:443>
>>     ServerName example.com/application1
>> </VirtualHost>
>> 
>> <VirtualHost *:443>
>>     ServerName example.com/application2
>> </VirtualHost>
>> <VirtualHost *:443>
>>     ServerName example.com/application3
>> </VirtualHost>
>> 
>> All applications are independent each has its own database,web app etc.
>> 
> What do you use as a "connector" to pass requests from Apache to Tomcat ?
> 
>  >     ServerName example.com/application1
> does not work.  A ServerName is a DNS host name.
> /application is the URI of a request.
> 
> You need something like
> 
>  > <VirtualHost *:443>
>  >     ServerName example.com
>        JkMount /application1 worker1
>        JkMount /application1/* worker1
>        JkMount /application2 worker2
>        JkMount /application2/* worker2
>        ...
>  > </VirtualHost>
> 
> (That's with mod_jk as a connector.)
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 

Thanks awarnier for the reply,

I am use mod_proxy_ajp. below is two section of the configuration.
unfortunately I don't use mod_jk. any solution for proxy.


<VirtualHost *:443>
     ServerName example.com

    ProxyRequests Off
    ProxyPreserveHost On
    proxyPass / ajp://localhost:8009/
SSLEngine on
SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile "C:/Program Files/Apache Software
Foundation/Apache2.2/conf/server.crt"
SSLCertificateKeyFile "C:/Program Files/Apache Software
Foundation/Apache2.2/conf/server.key"
</VirtualHost>

<VirtualHost *:443>
 ServerName anotherexample.com
    ProxyRequests Off
    ProxyPreserveHost On
    proxyPass / ajp://localhost:8088/

SSLEngine on
SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile "C:/Program Files/Apache Software
Foundation/Apache2.2/conf/server.crt"
SSLCertificateKeyFile "C:/Program Files/Apache Software
Foundation/Apache2.2/conf/server.key"

</VirtualHost>

Thanks

-- 
View this message in context: http://www.nabble.com/serving-multiple--application-servers-under-one-domain-name.-tp23377360p23382959.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.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