This shows you the differences between two versions of the page.
Next revision | Previous revision Last revision Both sides next revision | ||
mod_realip [2010/05/19 01:49] kyxap создано |
mod_realip [2016/08/08 21:27] kyxap |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== mod_realip для apache 2.2.x ==== | + | {{tag>apache realip}}====== mod_realip для apache 2.2.x ====== |
+ | |||
+ | **apache2.4** | ||
+ | |||
+ | RemoteIPHeader X-Real-IP | ||
+ | RemoteIPTrustedProxy 127.0.0.1 | ||
+ | |||
+ | **apache2.2** | ||
Не требует никакой настройки, достаточно скомпилировать и установить. При необходимости можно изменить заголовок с X-Real-IP на желаемый. | Не требует никакой настройки, достаточно скомпилировать и установить. При необходимости можно изменить заголовок с X-Real-IP на желаемый. | ||
Line 5: | Line 12: | ||
# apxs -a -i -c mod_realip.c | # apxs -a -i -c mod_realip.c | ||
- | <code lang=C> | + | <code C> |
#include "httpd.h" | #include "httpd.h" | ||
#include "http_config.h" | #include "http_config.h" | ||
Line 44: | Line 51: | ||
</code> | </code> | ||
+ | ===== Изменения для apache 2.4.x ===== | ||
+ | |||
+ | # sed 's/remote_ip/client_ip/g;s/remote_addr/client_addr/g' -i mod_realip.c |