apache2.2使用mod_remoteip模块

 

一.安装

wget https://github.com/ttkzw/mod_remoteip-httpd22/raw/master/mod_remoteip.c
/usr/local/apache/bin/apxs -i -c -n mod_remoteip.so mod_remoteip.c

 

 

二.添加Apache配置
vi /usr/local/apache/conf/httpd.conf
Include conf/extra/httpd-remoteip.conf
vi /usr/local/apache/conf/extra/httpd-remoteip.conf
LoadModule remoteip_module modules/mod_remoteip.so
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy 127.0.0.1 #多个前端代理,请用空格分隔

 

相关文章:

  • 2021-06-20
  • 2021-06-13
  • 2021-09-29
  • 2021-06-23
  • 2021-07-31
  • 2022-02-07
  • 2021-07-21
  • 2022-12-23
猜你喜欢
  • 2021-12-25
  • 2021-05-22
  • 2022-12-23
  • 2022-02-19
  • 2021-01-11
  • 2021-11-05
  • 2021-08-17
相关资源
相似解决方案