You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Werner Schalk <we...@gmx.de> on 2003/11/19 21:53:28 UTC

[users@httpd] ProxyPass with parameters

Hi,

I am using 2.0.48 and it works pretty fine. Now I would like to use
ProxyPass to include content from a third party source (yes I do have the 
permission to include the information). The thing is that ProxyPass seems to 
have problems with including content from a external source if the URL does 
contain parameters? So I have tried using ProxyPass like this:

ProxyPass / http://www.example.com/?userid=xyz-123

Unfortunately I get a 404 not found from the external source when I access my 
server saying that /?userid=xyz-123 could not be found. But when I enter the 
URL above in my browser it works pretty fine. What might be the reason for 
this and how can I solve it?

Bye and thanks,
Werner.


---------------------------------------------------------------------
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] ProxyPass with parameters

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 20 Nov 2003, Werner Schalk wrote:

> Hi,
>
> a loop is created although the third party system is a non-local one.
> Hhm, I change it back to the ProxyPass thing. Did anyone ever used ProxyPass
> with parameters? I mean is this a bug or why does Apache escape the
> parameters (like ?userid=xyz-123)?

There is no reason to use ProxyPass.  It is designed only to handle the
simple case.  Your case is not simple.

Since you haven't showed us any details, it is hard to tell what your
problem is.  If I had to guess, I would say that you need something closer
to
RewriteRule ^/(.*) http://example.com/$1?whatever
so that you don't send all the requests to the same page.

See the mod_rewrite docs for more details.

Joshua.

---------------------------------------------------------------------
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] ProxyPass with parameters

Posted by Werner Schalk <we...@gmx.de>.
Hi,

a loop is created although the third party system is a non-local one.
Hhm, I change it back to the ProxyPass thing. Did anyone ever used ProxyPass 
with parameters? I mean is this a bug or why does Apache escape the 
parameters (like ?userid=xyz-123)?

Bye and thanks,
Werner.


---------------------------------------------------------------------
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] ProxyPass with parameters

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 20 Nov 2003, Werner Schalk wrote:
> is there a way to prevent Apache from escaping the parameters?

That's what I just showed you.

> I have now add the following lines to my httpd.conf:
>
> RewriteEngine On
> RewriteRule / http://www.example.com/?userid=xyz-123 [P]
>
> Now when I restart the server the loads gets very high and the child processes
> die:
> [Thu Nov 20 01:03:22 2003] [error] server reached MaxClients setting, consider
> raising the MaxClients setting
> [Thu Nov 20 01:03:53 2003] [warn] child process 15378 still did not exit,
> sending a SIGTERM

Well, you need to do a little more analysis.  Check the access logs and
see what kind of requests apache is processing.  Are you sure you didn't
create a loop by proxying back to the same server?

Joshua.

---------------------------------------------------------------------
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] ProxyPass with parameters

Posted by Werner Schalk <we...@gmx.de>.
Hi,

is there a way to prevent Apache from escaping the parameters?
I have now add the following lines to my httpd.conf:

RewriteEngine On
RewriteRule / http://www.example.com/?userid=xyz-123 [P]

Now when I restart the server the loads gets very high and the child processes 
die:
[Thu Nov 20 01:03:22 2003] [error] server reached MaxClients setting, consider 
raising the MaxClients setting
[Thu Nov 20 01:03:53 2003] [warn] child process 15378 still did not exit, 
sending a SIGTERM
[Thu Nov 20 01:03:53 2003] [warn] child process 15381 still did not exit, 
sending a SIGTERM
[Thu Nov 20 01:03:53 2003] [warn] child process 15383 still did not exit, 
sending a SIGTERM
[Thu Nov 20 01:03:53 2003] [warn] child process 15400 still did not exit, 
sending a SIGTERM
[Thu Nov 20 01:03:53 2003] [warn] child process 15412 still did not exit, 
sending a SIGTERM
[Thu Nov 20 01:03:53 2003] [warn] child process 15413 still did not exit, 
sending a SIGTERM

Did anyone ever experience this problem? Do you think this is a bug?
Any other idea how I could include content from a remote third party using 
Apache directives (except of ProxyPass which seems to escape parameters!)?

Bye,
Werner.


---------------------------------------------------------------------
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] ProxyPass with parameters

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 19 Nov 2003, Werner Schalk wrote:
> ProxyPass / http://www.example.com/?userid=xyz-123
>
> Unfortunately I get a 404 not found from the external source when I access my
> server saying that /?userid=xyz-123 could not be found. But when I enter the
> URL above in my browser it works pretty fine. What might be the reason for
> this and how can I solve it?

Apache is probably escaping the ?.

Try this:

RewriteEngine On
RewriteRule / http://www.example.com/?userid=xyz-123 [P]

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