meta data for this page
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
sw:apache:proxy [2025/01/11 10:48] – created niziak | sw:apache:proxy [2025/05/29 10:49] (current) – niziak | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== reverse proxy ====== | ====== reverse proxy ====== | ||
+ | |||
+ | ===== log x-forwarded-for ===== | ||
+ | |||
+ | From apache2.conf: | ||
+ | < | ||
+ | https:// | ||
+ | # Note that the use of %{X-Forwarded-For}i instead of %h is not recommended. | ||
+ | # Use mod_remoteip instead. | ||
+ | </ | ||
+ | |||
+ | ==== enable remoteip module ==== | ||
+ | |||
+ | Enable the remoteip module: | ||
+ | |||
+ | <code bash> | ||
+ | |||
+ | <file ini / | ||
+ | RemoteIPHeader X-Forwarded-For | ||
+ | RemoteIPTrustedProxy 192.168.0.0/ | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | |||
+ | |||
+ | ===== reverse proxy ===== | ||
+ | |||
+ | < | ||
+ | ProxyRequests Off | ||
+ | SSLEngine On | ||
+ | SSLProxyEngine On | ||
+ | |||
+ | ProxyPass / https:// | ||
+ | ProxyPassReverse / https:// | ||
+ | </ | ||
+ | |||
===== app behind location (folder) ===== | ===== app behind location (folder) ===== | ||
Line 14: | Line 49: | ||
If not possibe to reconfigure remote service server you can try to use '' | If not possibe to reconfigure remote service server you can try to use '' | ||
+ | |||
+ | Read: [[http:// | ||
<code bash> | <code bash> | ||
Line 19: | Line 56: | ||
</ | </ | ||
+ | File ''/ | ||
+ | <code ini> | ||
+ | # ProxyRequests Off <-- this is an important security setting | ||
+ | # ProxyPass / | ||
+ | # < | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # </ | ||
+ | |||
+ | </ | ||