On Fri, Oct 30, 2020 at 9:04 PM Mike Diehl <mdiehlena...@gmail.com> wrote:
>
>  Well, I added this to the vhost definition:
>
> ProxyPreserveHost On
> RemoteIPHeader X-Forwarded-For
>
> Now I'm getting the web server's outside IP address as the value of the 
> x-forwarded-for header.  This is progress, but not quite what I need.  I need 
> the original client's IP address before the request gets proxied to my 
> application server.
>
> Any other ideas?

You need to tell the proxy itself to add the X-Forwarded-* headers,
using ProxyAddHeaders ([1]).
So your <Location> section could be something like:

         <Location "/apps/">
           ProxyPass "http://127.0.0.1:8080/apps/";
           ProxyAddHeaders on
         </Location>

Regards;
Yann.

[1] https://httpd.apache.org/docs/2.4/en/mod/mod_proxy.html#proxyaddheaders

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to