You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "--[ UxBoD ]--" <ux...@splatnix.net> on 2011/05/17 13:16:12 UTC
[users@httpd] mod_proxy and .htaccess
Hi,
I have been experimenting with Apache running on port 80 and then proxying to a second instance on 8080; the second instance being chrooted. All is working great except .htaccess due to it being processed by the second httpd instance which sees all connections coming from 127.0.0.1. Is there any way around this or should I move the restrictions directly into the httpd.conf ?
--
Thanks, Phil
Re: [users@httpd] mod_proxy and .htaccess
Posted by "--[ UxBoD ]--" <ux...@splatnix.net>.
----- Original Message -----
> On Tue, May 17, 2011 at 12:16 PM, --[ UxBoD ]-- <ux...@splatnix.net>
> wrote:
> > Hi,
> > I have been experimenting with Apache running on port 80 and then
> > proxying
> > to a second instance on 8080; the second instance being chrooted.
> > All is
> > working great except .htaccess due to it being processed by the
> > second httpd
> > instance which sees all connections coming from 127.0.0.1. Is there
> > any way
> > around this or should I move the restrictions directly into the
> > httpd.conf ?
> > --
> > Thanks, Phil
> >
> >
>
> Thats because the connections *do* come from 127.0.0.1 . There are a
> number of 3rd party modules (well, mod_remoteip is apache 2.3+) that
> will update the apache request so that it appears to come from the IP
> that the first apache puts in X-Forwarded-For.
>
> mod_rpaf2
> mod_remoteip
>
> Cheers
>
> Tom
>
Thanks for the though I must be doing something wrong as I have added to the Apache conf running on port 8080:
LoadModule rpaf_module modules/mod_rpaf-2.0.so
<IfModule mod_rpaf.c>
RPAFenable On
RPAFsethostname On
RPAFproxy_ips 127.0.0.1
RPAFheader X_Forwarded_For
</IfModule>
and it is still writing 127.0.0.1 into the log files and blocking in .htaccess. I have checked the error log and no issues there; plus have ran phpinfo() and see that X-Forwarded-For is being set correctly.
Any thoughts ?
--
Thanks, Phil
---------------------------------------------------------------------
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] mod_proxy and .htaccess
Posted by Tom Evans <te...@googlemail.com>.
On Tue, May 17, 2011 at 12:16 PM, --[ UxBoD ]-- <ux...@splatnix.net> wrote:
> Hi,
> I have been experimenting with Apache running on port 80 and then proxying
> to a second instance on 8080; the second instance being chrooted. All is
> working great except .htaccess due to it being processed by the second httpd
> instance which sees all connections coming from 127.0.0.1. Is there any way
> around this or should I move the restrictions directly into the httpd.conf ?
> --
> Thanks, Phil
>
>
Thats because the connections *do* come from 127.0.0.1 . There are a
number of 3rd party modules (well, mod_remoteip is apache 2.3+) that
will update the apache request so that it appears to come from the IP
that the first apache puts in X-Forwarded-For.
mod_rpaf2
mod_remoteip
Cheers
Tom
---------------------------------------------------------------------
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