This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
mod_realip [2013/12/15 17:00] kyxap |
mod_realip [2016/08/08 21:29] (current) kyxap |
||
---|---|---|---|
Line 1: | Line 1: | ||
{{tag>apache realip}}====== mod_realip для apache 2.2.x ====== | {{tag>apache realip}}====== mod_realip для apache 2.2.x ====== | ||
+ | |||
+ | **apache2.4** | ||
+ | |||
+ | <file conf /etc/apache2/mods-enabled/remoteip.conf> | ||
+ | RemoteIPHeader X-Real-IP | ||
+ | RemoteIPTrustedProxy 127.0.0.1 | ||
+ | </file> | ||
+ | |||
+ | **apache2.2** | ||
Не требует никакой настройки, достаточно скомпилировать и установить. При необходимости можно изменить заголовок с X-Real-IP на желаемый. | Не требует никакой настройки, достаточно скомпилировать и установить. При необходимости можно изменить заголовок с X-Real-IP на желаемый. | ||
Line 44: | Line 53: | ||
</code> | </code> | ||
+ | ===== Изменения для apache 2.4.x ===== | ||
+ | |||
+ | # sed 's/remote_ip/client_ip/g;s/remote_addr/client_addr/g' -i mod_realip.c |