You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Amol Puglia <am...@yahoo.com> on 2010/09/20 07:53:35 UTC

[users@httpd] Apacge url is changing to application server url

Hello Team,

I have configured load balancer of 3 instances of tomcat with apache using mod_proxy_ajp and balancer.

Whenever i access apache url, the request is going to tomcat but it is also showing the 

application server url.

I am using following version of softwares.

Apache version :- 2.2.14

Tomcat Version :- 6.0.20.

Suppose apache web server url is following :-

http:\\apachewebserver_hostname/eMatrix/servlet/Controller

is changing to

http:\\tomcatserver_hostname:8081/eMatrix/servlet/Controller

http:\\tomcatserver_hostname:8082/eMatrix/servlet/Controller

http:\\tomcatserver_hostname:8083/eMatrix/servlet/Controller


whenver i try to access the application using apache web server url.


I dont want my apache web server url should change to tomcat application server url.

kindly help me to resolve the issues.

Below is the configuration for the mod_proxy_loadbalancer and ajp.

LoadModule ssl_module modules/mod_ssl.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so

ProxyRequests Off

ProxyPass /eMatrix balancer://cluster

ProxyPassReverse /eMatrix ajp://server_name:8009/eMatrix

ProxyPassReverse /eMatrix ajp://server_name:8010/eMatrix

ProxyPassReverse /eMatrix ajp://server_name:8011/eMatrix

<Proxy balancer://cluster>
BalancerMember ajp://server_name:8009/eMatrix route=marsstage_rmiserver_1 retry=60
BalancerMember ajp://server_name:8010/eMatrix route=marsstage_rmiserver_2 retry=60
BalancerMember ajp://server_name:8011/eMatrix route=marsstage_rmiserver_3 retry=60
</Proxy>





      

Re: [users@httpd] Apacge url is changing to application server url

Posted by Rainer Jung <ra...@kippdata.de>.
Eric meant:

ProxyPassReverse /eMatrix http://server_name:8081/eMatrix
ProxyPassReverse /eMatrix http://server_name:8082/eMatrix
ProxyPassReverse /eMatrix http://server_name:8083/eMatrix

It is strange though, that these redirects happen when using ajp.

Regards,

Rainer

On 21.09.2010 07:35, Amol Puglia wrote:
>   Hello Tushar,
>
> Thanks for the response.
>
> I have added the option ProxyPreserveHost on but i am still facing same
> issue.
>
> My webserver url is changing to application server url.
>
> kindly assist.
>
> --- On *Mon, 9/20/10, Tushar Chavan /<tu...@hotmail.com>/* wrote:
>
>
>     From: Tushar Chavan <tu...@hotmail.com>
>     Subject: RE: [users@httpd] Apacge url is changing to application
>     server url
>     To: users@httpd.apache.org, amolcpuglia@yahoo.com
>     Date: Monday, September 20, 2010, 9:55 PM
>
>     Add ProxyPreserveHost on
>
>     Date: Mon, 20 Sep 2010 04:56:27 -0700
>     From: amolcpuglia@yahoo.com
>     To: users@httpd.apache.org
>     Subject: Re: [users@httpd] Apacge url is changing to application
>     server url
>
>     Hello Eric,
>
>     Thanks for the response.
>
>     It would be great if you let me know what needs to be added in
>     apache configuration file to acheive ProxyPassReverse for the
>     redirected ports.
>
>
>
>
>     --- On *Mon, 9/20/10, Eric Covener /<co...@gmail.com>/* wrote:
>
>
>         From: Eric Covener <co...@gmail.com>
>         Subject: Re: [users@httpd] Apacge url is changing to application
>         server url
>         To: users@httpd.apache.org
>         Date: Monday, September 20, 2010, 4:33 PM
>
>         On Mon, Sep 20, 2010 at 1:53 AM, Amol Puglia
>         <amolcpuglia@yahoo.com
>         <ht...@yahoo.com>> wrote:
>          > http:\\tomcatserver_hostname:8081/eMatrix/servlet/Controller
>          > http:\\tomcatserver_hostname:8082/eMatrix/servlet/Controller
>          > http:\\tomcatserver_hostname:8083/eMatrix/servlet/Controller
>
>          > ProxyPassReverse /eMatrix ajp://server_name:8009/eMatrix
>          > ProxyPassReverse /eMatrix ajp://server_name:8010/eMatrix
>          > ProxyPassReverse /eMatrix ajp://server_name:8011/eMatrix
>
>
>         Try ProxyPassReverse for the redirected ports.

---------------------------------------------------------------------
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


RE: [users@httpd] Apacge url is changing to application server url

Posted by Amol Puglia <am...@yahoo.com>.
Hello Tushar,

Thanks for the response.

I have added the option ProxyPreserveHost on but i am still facing same issue.

My webserver url is changing to application server url.

kindly assist.

--- On Mon, 9/20/10, Tushar Chavan <tu...@hotmail.com> wrote:

From: Tushar Chavan <tu...@hotmail.com>
Subject: RE: [users@httpd] Apacge url is changing to application server url
To: users@httpd.apache.org, amolcpuglia@yahoo.com
Date: Monday, September 20, 2010, 9:55 PM




Add   ProxyPreserveHost on 

Date: Mon, 20 Sep 2010 04:56:27 -0700
From: amolcpuglia@yahoo.com
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apacge url is changing to application server url

Hello Eric,

Thanks for the response.

It would be great if you let me know  what needs to be added in apache configuration file to acheive  ProxyPassReverse for the redirected ports.




--- On Mon, 9/20/10, Eric Covener <co...@gmail.com> wrote:

From: Eric Covener <co...@gmail.com>
Subject: Re: [users@httpd] Apacge url is changing to application server url
To: users@httpd.apache.org
Date: Monday, September 20, 2010, 4:33 PM

On Mon, Sep 20, 2010 at 1:53 AM, Amol Puglia <am...@yahoo.com> wrote:
>
 http:\\tomcatserver_hostname:8081/eMatrix/servlet/Controller
> http:\\tomcatserver_hostname:8082/eMatrix/servlet/Controller
> http:\\tomcatserver_hostname:8083/eMatrix/servlet/Controller

> ProxyPassReverse /eMatrix ajp://server_name:8009/eMatrix
> ProxyPassReverse /eMatrix ajp://server_name:8010/eMatrix
> ProxyPassReverse /eMatrix ajp://server_name:8011/eMatrix


Try ProxyPassReverse for the redirected ports.

--
Eric Covener
covener@gmail.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


 		 	   		  



      

RE: [users@httpd] Apacge url is changing to application server url

Posted by Tushar Chavan <tu...@hotmail.com>.
Add   ProxyPreserveHost on 

Date: Mon, 20 Sep 2010 04:56:27 -0700
From: amolcpuglia@yahoo.com
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apacge url is changing to application server url

Hello Eric,

Thanks for the response.

It would be great if you let me know  what needs to be added in apache configuration file to acheive  ProxyPassReverse for the redirected ports.




--- On Mon, 9/20/10, Eric Covener <co...@gmail.com> wrote:

From: Eric Covener <co...@gmail.com>
Subject: Re: [users@httpd] Apacge url is changing to application server url
To: users@httpd.apache.org
Date: Monday, September 20, 2010, 4:33 PM

On Mon, Sep 20, 2010 at 1:53 AM, Amol Puglia <am...@yahoo.com> wrote:
>
 http:\\tomcatserver_hostname:8081/eMatrix/servlet/Controller
> http:\\tomcatserver_hostname:8082/eMatrix/servlet/Controller
> http:\\tomcatserver_hostname:8083/eMatrix/servlet/Controller

> ProxyPassReverse /eMatrix ajp://server_name:8009/eMatrix
> ProxyPassReverse /eMatrix ajp://server_name:8010/eMatrix
> ProxyPassReverse /eMatrix ajp://server_name:8011/eMatrix


Try ProxyPassReverse for the redirected ports.

--
Eric Covener
covener@gmail.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


 		 	   		  

Re: [users@httpd] Apacge url is changing to application server url

Posted by Amol Puglia <am...@yahoo.com>.
Hello Eric,

Thanks for the response.

It would be great if you let me know  what needs to be added in apache configuration file to acheive  ProxyPassReverse for the redirected ports.




--- On Mon, 9/20/10, Eric Covener <co...@gmail.com> wrote:

From: Eric Covener <co...@gmail.com>
Subject: Re: [users@httpd] Apacge url is changing to application server url
To: users@httpd.apache.org
Date: Monday, September 20, 2010, 4:33 PM

On Mon, Sep 20, 2010 at 1:53 AM, Amol Puglia <am...@yahoo.com> wrote:
> http:\\tomcatserver_hostname:8081/eMatrix/servlet/Controller
> http:\\tomcatserver_hostname:8082/eMatrix/servlet/Controller
> http:\\tomcatserver_hostname:8083/eMatrix/servlet/Controller

> ProxyPassReverse /eMatrix ajp://server_name:8009/eMatrix
> ProxyPassReverse /eMatrix ajp://server_name:8010/eMatrix
> ProxyPassReverse /eMatrix ajp://server_name:8011/eMatrix


Try ProxyPassReverse for the redirected ports.

--
Eric Covener
covener@gmail.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




      

Re: [users@httpd] Apacge url is changing to application server url

Posted by Eric Covener <co...@gmail.com>.
On Mon, Sep 20, 2010 at 1:53 AM, Amol Puglia <am...@yahoo.com> wrote:
> http:\\tomcatserver_hostname:8081/eMatrix/servlet/Controller
> http:\\tomcatserver_hostname:8082/eMatrix/servlet/Controller
> http:\\tomcatserver_hostname:8083/eMatrix/servlet/Controller

> ProxyPassReverse /eMatrix ajp://server_name:8009/eMatrix
> ProxyPassReverse /eMatrix ajp://server_name:8010/eMatrix
> ProxyPassReverse /eMatrix ajp://server_name:8011/eMatrix


Try ProxyPassReverse for the redirected ports.

--
Eric Covener
covener@gmail.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