What do the numbers near a user name on the user list mean?
mod_proxy and Redirect
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > Apache HTTP Server > mod_proxy and Redirect 22 March 2005 14:23:03

  Recent blog posts: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

mod_proxy and Redirect

K Anand 22 March 2005 14:23:03
 Apache 1.3.27

I have a server configuration where I use ProxyPass. In the virtual host
where the ProxyPass is located, I also have a Redirect rule. It seems like
Proxypass is taking preference to Redirect. Is this correct ?? I tried the
same thing with RewriteRule....Here­ also it looks like ProxyPass is taking
precedence...The RewriteRule and Redirect rule were written before the
ProxyPass directives ...

Can someone help ?


-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org


Add comment
Joshua Slive 9 March 2005 17:05:58 permanent link ]
 On Wed, 9 Mar 2005 14:41:09 +0530, K Anand <kanand@sail-steel.­com> wrote:> Apache 1.3.27>
I have a server configuration where I use ProxyPass. In the virtual host> where the ProxyPass is located, I also have a Redirect rule. It seems like> Proxypass is taking preference to Redirect. Is this correct ?? I tried the> same thing with RewriteRule....Here­ also it looks like ProxyPass is taking> precedence...The RewriteRule and Redirect rule were written before the> ProxyPass directives ...

Two possible solutions:

1. Use the "ProxyPass /foo !" syntax to exempt certain URLs from the proxypass.

2. Try changing the module ordering by reording the LoadModule
directives in httpd.conf.

Joshua.

-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org


Add comment
K Anand 10 March 2005 07:18:29 permanent link ]
 Josh,

1) I checked my httpd.conf file. The rewrite module is being loaded before
the proxy module.
2) I do need to do the reverse proxy . So I cannot negate that.

Here's my scenario in detail.

client --- Webserver ----- Appln server
https http

Webserver to Appln server connections are made by ProxyPass. Since this is
application is used for all
transactions of our company and it can be deployed on the internet, we are
planning to use SSL between
client and Webserver. So all requests between client and Webserver will be
on https. What I want is that
when the URL is say https://abc.com/doc­s/xyz it should be rewritten to
http://abc.com/docs­/xyz. In addition
to this, there is a ProxyPass on Webserver which is like this :
ProxyPass /docs/ http://abc1.com/doc­s/


When I'm disabling the ProxyPass statement in my httpd.conf, I can see that
URL is being rewritten from
https to http. But the moment I uncomment the ProxyPass statement, URL is
not being rewritten.

Any clues why ??

Anand




----- Original Message -----
From: "Joshua Slive" <jslive@gmail.com>
To: <users@httpd.apache­.org>
Sent: Wednesday, March 09, 2005 7:35 PM
Subject: Re: [users@httpd] mod_proxy and Redirect

On Wed, 9 Mar 2005 14:41:09 +0530, K Anand <kanand@sail-steel.­com> wrote:> > Apache 1.3.27> >
I have a server configuration where I use ProxyPass. In the virtual host> > where the ProxyPass is located, I also have a Redirect rule. It seems
like> > Proxypass is taking preference to Redirect. Is this correct ?? I tried
same thing with RewriteRule....Here­ also it looks like ProxyPass is
taking> > precedence...The RewriteRule and Redirect rule were written before the> > ProxyPass directives ...>
Two possible solutions:>
1. Use the "ProxyPass /foo !" syntax to exempt certain URLs from the
proxypass.>
2. Try changing the module ordering by reording the LoadModule> directives in httpd.conf.>
Joshua.>
-------------------­--------------------­--------------------­----------> The official User-To-User support forum of the Apache HTTP Server Project.> See <URL:http://httpd.a­pache.org/userslist.­html> for more info.> To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org> " from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg> For additional commands, e-mail: users-help@httpd.ap­ache.org>


-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org


Add comment
Axel-StГ©phane SMORGRAV 10 March 2005 11:12:24 permanent link ]
 Have you tried to reverse the order of the LoadModule directives for the rewrite and proxy modules in your configuration? Are these statically or dynamically linked?

-ascs

-----Message d'origine-----
De : K Anand [mailto:kanand@sail-steel.com]
EnvoyГ© : jeudi 10 mars 2005 05:18
ГЂ : users@httpd.apache.­org
Objet : Re: [users@httpd] mod_proxy and Redirect

Josh,

1) I checked my httpd.conf file. The rewrite module is being loaded before the proxy module.
2) I do need to do the reverse proxy . So I cannot negate that.

Here's my scenario in detail.

client --- Webserver ----- Appln server
https http

Webserver to Appln server connections are made by ProxyPass. Since this is application is used for all transactions of our company and it can be deployed on the internet, we are planning to use SSL between client and Webserver. So all requests between client and Webserver will be on https. What I want is that
when the URL is say https://abc.com/doc­s/xyz it should be rewritten to
http://abc.com/docs­/xyz. In addition
to this, there is a ProxyPass on Webserver which is like this :
ProxyPass /docs/ http://abc1.com/doc­s/


When I'm disabling the ProxyPass statement in my httpd.conf, I can see that URL is being rewritten from https to http. But the moment I uncomment the ProxyPass statement, URL is not being rewritten.

Any clues why ??

Anand




----- Original Message -----
From: "Joshua Slive" <jslive@gmail.com>
To: <users@httpd.apache­.org>
Sent: Wednesday, March 09, 2005 7:35 PM
Subject: Re: [users@httpd] mod_proxy and Redirect

On Wed, 9 Mar 2005 14:41:09 +0530, K Anand <kanand@sail-steel.­com> wrote:> > Apache 1.3.27> >
I have a server configuration where I use ProxyPass. In the virtual host> > where the ProxyPass is located, I also have a Redirect rule. It seems
like> > Proxypass is taking preference to Redirect. Is this correct ?? I tried
same thing with RewriteRule....Here­ also it looks like ProxyPass is
taking> > precedence...The RewriteRule and Redirect rule were written before the> > ProxyPass directives ...>
Two possible solutions:>
1. Use the "ProxyPass /foo !" syntax to exempt certain URLs from the
proxypass.>
2. Try changing the module ordering by reording the LoadModule> directives in httpd.conf.>
Joshua.>
-------------------­--------------------­--------------------­----------> The official User-To-User support forum of the Apache HTTP Server Project.> See <URL:http://httpd.a­pache.org/userslist.­html> for more info.> To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org> " from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg> For additional commands, e-mail: users-help@httpd.ap­ache.org>


-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org


-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org


Add comment
K Anand 10 March 2005 11:22:03 permanent link ]
 
From: "Axel-StГ©phane SMORGRAV" <Axel-Stephane.SMOR­GRAV@europe.adp.com>­>

Have you tried to reverse the order of the LoadModule directives for the
rewrite and proxy modules in your >configuration? Are these statically or
dynamically linked?>
-ascs

Yes I did try to reverse the order..now my proxy module gets loaded before
the rewrite module...Still the same results....No these modules are not
compiled into apache , if that is what u mean..

Anand




-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org


Add comment
Axel-StГ©phane SMORGRAV 10 March 2005 11:42:14 permanent link ]
 Sorry. Let me rephrase that.

Have you tried to reverse the order of the LoadModule directives for the ALIAS and PROXY modules in your configuration?

The order in which the modules are loaded is significant for the order in which directives from different modules are executed. If I am not mistaken the modules are stacked so the first module loaded will be the last to execute. You should therefore make sure that the alias module is loaded after the proxy module.

The redirect directive is implemented by the Alias module - not by the rewrite module as far as I can see from the Apache manual.

Another thing you may try is to use a rewrite rule instead of the Redirect directive, provided mod_rewrite is loaded.

RewriteRule ^/foobar(.*)$ http://a.b.c/foobar­$1 [R]
is equivalent to
Redirect /foobar http://a.b.c/foobar­

-ascs

-----Message d'origine-----
De : Axel-StГ©phane SMORGRAV [mailto:Axel-Stephane.SMORGRAV@europe.adp.com]
EnvoyГ© : jeudi 10 mars 2005 09:12
ГЂ : users@httpd.apache.­org
Objet : RE: [users@httpd] mod_proxy and Redirect

Have you tried to reverse the order of the LoadModule directives for the rewrite and proxy modules in your configuration? Are these statically or dynamically linked?

-ascs

-----Message d'origine-----
De : K Anand [mailto:kanand@sail-steel.com] EnvoyГ© : jeudi 10 mars 2005 05:18 ГЂ : users@httpd.apache.­org Objet : Re: [users@httpd] mod_proxy and Redirect

Josh,

1) I checked my httpd.conf file. The rewrite module is being loaded before the proxy module.
2) I do need to do the reverse proxy . So I cannot negate that.

Here's my scenario in detail.

client --- Webserver ----- Appln server
https http

Webserver to Appln server connections are made by ProxyPass. Since this is application is used for all transactions of our company and it can be deployed on the internet, we are planning to use SSL between client and Webserver. So all requests between client and Webserver will be on https. What I want is that
when the URL is say https://abc.com/doc­s/xyz it should be rewritten to
http://abc.com/docs­/xyz. In addition
to this, there is a ProxyPass on Webserver which is like this :
ProxyPass /docs/ http://abc1.com/doc­s/


When I'm disabling the ProxyPass statement in my httpd.conf, I can see that URL is being rewritten from https to http. But the moment I uncomment the ProxyPass statement, URL is not being rewritten.

Any clues why ??

Anand


-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org


Add comment
K Anand 10 March 2005 12:31:54 permanent link ]
 
From: "Axel-StГ©phane SMORGRAV" <Axel-Stephane.SMOR­GRAV@europe.adp.com>­>

Sorry. Let me rephrase that.
Have you tried to reverse the order of the LoadModule directives for the
ALIAS and PROXY modules in your configuration?
The order in which the modules are loaded is significant for the order in
which directives from different modules are executed. If I am not mistaken
the modules >are stacked so the first module loaded will be the last to
execute. You should therefore make sure that the alias module is loaded
after the proxy module.
The redirect directive is implemented by the Alias module - not by the
rewrite module as far as I can see from the Apache manual.
Another thing you may try is to use a rewrite rule instead of the Redirect
directive, provided mod_rewrite is loaded.
RewriteRule ^/foobar(.*)$ http://a.b.c/foobar­$1 [R]>is equivalent to>Redirect /foobar http://a.b.c/foobar­
-ascs

I was actually using rewrute only..mod_proxy is loaded before
mod_rewrite...still­ not working
then I changed the rewrite to Redirect ..mod_alias is loaded after
mod_proxy...still not working.

Now I have changed the AddModule order also and NOW it is finally doing what
it is supposed to do...
Thanx a lot.

Anand



-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org


Add comment
Axel-StГ©phane SMORGRAV 21 March 2005 13:10:09 permanent link ]
 I am a little bit surprised that changing the order in which the modules are loaded does not do anything for you.

Even if the modules were compiled into Apache you would have had the possibility to change the order of the modules with ClearModuleList and AddModule.

I have myself used Apache 1.3 as a reverse proxy and done redirects using the rewrite module and never had problems with that provided the module ordering was correct. If it can be of any help to you, here is the order in which we added modules:

ClearModuleList
AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_mime.c
AddModule mod_status.c
AddModule mod_cgi.c
AddModule mod_alias.c
AddModule mod_access.c
AddModule mod_digest.c
AddModule mod_proxy.c
AddModule mod_headers.c
AddModule mod_usertrack.c
AddModule mod_so.c
AddModule mod_rewrite.c
AddModule mod_setenvif.c
<IfDefine SSL>
AddModule mod_ssl.c
</IfDefine>

Otherwise, if you have no compelling reason for staying with Apache 1.3, you may consider migrating to 2.0. That would take care of your module ordering problem altogether.

Best reagrds,
-ascs


-----Message d'origine-----
De : K Anand [mailto:kanand@sail-steel.com]
EnvoyГ© : jeudi 10 mars 2005 09:22
ГЂ : users@httpd.apache.­org
Objet : Re: [users@httpd] mod_proxy and Redirect
From: "Axel-StГ©phane SMORGRAV" <Axel-Stephane.SMOR­GRAV@europe.adp.com>­>

Have you tried to reverse the order of the LoadModule directives for >the
rewrite and proxy modules in your >configuration? Are these statically or dynamically linked?>
-ascs

Yes I did try to reverse the order..now my proxy module gets loaded before the rewrite module...Still the same results....No these modules are not compiled into apache , if that is what u mean..

Anand

-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org


Add comment
K Anand 21 March 2005 13:47:51 permanent link ]
 Hey, I had replied that once I had changed the LoadModule and AddModule
orders, everything was working fine...I think you have missed that post.
Thanks for your reply anyway.

Anand

----- Original Message -----
From: "Axel-StГ©phane SMORGRAV" <Axel-Stephane.SMOR­GRAV@europe.adp.com>­
To: <users@httpd.apache­.org>
Sent: Monday, March 21, 2005 2:40 PM
Subject: RE: [users@httpd] mod_proxy and Redirect


I am a little bit surprised that changing the order in which the modules are
loaded does not do anything for you.

Even if the modules were compiled into Apache you would have had the
possibility to change the order of the modules with ClearModuleList and
AddModule.

I have myself used Apache 1.3 as a reverse proxy and done redirects using
the rewrite module and never had problems with that provided the module
ordering was correct. If it can be of any help to you, here is the order in
which we added modules:

ClearModuleList
AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_mime.c
AddModule mod_status.c
AddModule mod_cgi.c
AddModule mod_alias.c
AddModule mod_access.c
AddModule mod_digest.c
AddModule mod_proxy.c
AddModule mod_headers.c
AddModule mod_usertrack.c
AddModule mod_so.c
AddModule mod_rewrite.c
AddModule mod_setenvif.c
<IfDefine SSL>
AddModule mod_ssl.c
</IfDefine>

Otherwise, if you have no compelling reason for staying with Apache 1.3, you
may consider migrating to 2.0. That would take care of your module ordering
problem altogether.

Best reagrds,
-ascs





-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org


Add comment
Axel-StГ©phane SMORGRAV 22 March 2005 14:23:03 permanent link ]
 Ooops. Sorry

I guess I missed the last sentence in that mail...

-ascs

-----Message d'origine-----
De : K Anand [mailto:kanand@sail-steel.com]
EnvoyГ© : lundi 21 mars 2005 10:48
ГЂ : users@httpd.apache.­org
Objet : Re: [users@httpd] mod_proxy and Redirect

Hey, I had replied that once I had changed the LoadModule and AddModule orders, everything was working fine...I think you have missed that post.
Thanks for your reply anyway.

Anand


-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org


Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > Apache HTTP Server > mod_proxy and Redirect 22 March 2005 14:23:03

see also:
MySQL/InnoDB bug?
mysql search for repeated value
contrib/ sparse code cleanup
пройди тесты:
see also:

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .