Tag Info

Hot answers tagged

4

My bet? lighttpd is adding an X-Forwarded-For header, and Django has something hardcoded somewhere to know that 127.0.0.1 is unlikely to be the real remote IP address if that header's present. You should verify that the X-Forwarded-For header is present, then get Django to use that as the remote address (looks like the way to do that is here).


2

If a company has every client and server on a single subnet, then yes.. clients could potentially be without a default gateway, if they are using a proxy. Not all applications are proxy-aware, so I would call it a horrible, horrible setup. But yes, it is possible.


1

I have established what the problems were with my setup. 1) SELinux was preventing me from connecting upstream. I have now disabled this and will consider setting it up properly later 2) proxy_pass was doing its job as expected, however the args I needed were http://123.123.123.1:$server_port/$uri$is_args$args; 3) proxy_set_header Host $host correctly set ...


1

This should be all you need: RewriteEngine On RewriteRule ^/api/(.*)$ https://example.com/api/$1 [P,QSA,L] Apache will basically proxy your requests by creating new http requests via the mod_rewrite module, which is enabled by default



Only top voted, non community-wiki answers of a minimum length are eligible