You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Gregory F. March" <ma...@gfm.net> on 2006/08/08 18:53:58 UTC

[users@httpd] Reverse proxying behind a firewall

Hi all...

I'm experiencing a problem with reverse proxying to a gallery (
gallery.sf.net) site that resides behind my firewall. I've been having a
long discussion over on the gallery forums and it is probably easier to read
the problem there rather than re-type it here. Here is the link:
http://gallery.menalto.com/node/52712

In short, I think I've found a bug in the gallery software, but I am also
experiencing some problem with mod_proxy getting confused. Of course, it is
probably me who is confused on how to use ProxyPass and ProxyPassReverse.

Basically, I have lines like this:

    ProxyPass / http://apache2.foo.com/gallery2
    ProxyPassReverse / http://apache2.foo.com/gallery2

in my httpd.conf on my webserver that is accessible from the net that is
serving HTTP on port 443 (don't ask - firewall issues...).

When apache (1.3) proxy's requests, gallery is dropping the port (the
gallery bug), but apache appears to be returning url's to my browser with
the 'gallery2' added. So, for example, I make a request for:

    http://apache13.foo.com:443/main.php

and I get back:

    http://apache13.foo.com/gallery2/main.php

I can force gallery to put the 443 in the url, but it is still an invalid
url.

I'm hoping that someone can explain to me what I am doing wrong.

Thanks!

/greg

-- 
Gregory F. March    |    http://www.gregmarch.com    |    AIM:GfmNet

Re: [users@httpd] Reverse proxying behind a firewall

Posted by "Gregory F. March" <ma...@gfm.net>.
Thanks.... I wound up using mod_rewrite instead, and it works fine:

RewriteRule ^/gallery2/(.*)$  http://apache2.foo.com/gallery2/$1 [P,L]
RewriteRule ^/(.*)$           http://apache2.foo.com/gallery2/$1 [P,L]

Hopefully, the end result of all this work will be to migrate off 1.3 and on
to 2.x. I'm stuck with DB upgrade issues at the moment though, since it is a
whole new OS as well.

Thanks again!

/greg

On 8/9/06, Vincent Bray <no...@gmail.com> wrote:
>
> On 8/8/06, Gregory F. March <ma...@gfm.net> wrote:
> > When apache (1.3) proxy's requests, gallery is dropping the port (the
> > gallery bug), but apache appears to be returning url's to my browser
> with
> > the 'gallery2' added. So, for example, I make a request for:
> >
> >     http://apache13.foo.com:443/main.php
> >
> > and I get back:
> >
> >     http://apache13.foo.com/gallery2/main.php
>
> That's generally what happens when you reverse proxy to a site using a
> different base uri ('/' and '/gallery2' in this case). You could make
> this a lot easier by using
> http://apache13.foo.com:443/gallery2/main.php
> .. as the front side url. There's a fine module for apache2.x called
> mod_proxy_html which can work around these issues, but that doesn't
> help you running 1.3 on the proxy.
>
> --
> noodl
>
> ---------------------------------------------------------------------
> 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
>
>


-- 
Gregory F. March    |    http://www.gregmarch.com    |    AIM:GfmNet

Re: [users@httpd] Reverse proxying behind a firewall

Posted by Vincent Bray <no...@gmail.com>.
On 8/8/06, Gregory F. March <ma...@gfm.net> wrote:
> When apache (1.3) proxy's requests, gallery is dropping the port (the
> gallery bug), but apache appears to be returning url's to my browser with
> the 'gallery2' added. So, for example, I make a request for:
>
>     http://apache13.foo.com:443/main.php
>
> and I get back:
>
>     http://apache13.foo.com/gallery2/main.php

That's generally what happens when you reverse proxy to a site using a
different base uri ('/' and '/gallery2' in this case). You could make
this a lot easier by using
http://apache13.foo.com:443/gallery2/main.php
.. as the front side url. There's a fine module for apache2.x called
mod_proxy_html which can work around these issues, but that doesn't
help you running 1.3 on the proxy.

-- 
noodl

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