apache获取nginx反向代理或CDN访客真实IP

Apache旧版用rpaf_module获取反向代理真实IP,在Apache2.2之后就支持mod_remoteip模块,在Apache2.4之后就内置mod_remoteip模块更方便。

#查看是否已加载mod_remoteip模块
apachectl -l | grep mod_remoteip
返回以下内容说明已加载mod_remoteip模块
mod_remoteip.c

安装并配置支持sasl的Memcached服务器

网上有很多Memcached配置教程,但是也是比较混乱或者比较老的版本了。这里也整理一下。

1.先安装依赖包libevent
wget https://soft.huayizhiyun.com/manage/directadmin/memcached/memcached/libevent-2.1.8-stable.tar.gz
tar -zxvf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./configure --prefix=/usr
make
make install
cd ..
ll /usr/lib | grep libevent

DirectAdmin安装pecl-memcached模块并…

看到网上很多Directadmin的memcache教程都过时了,自己编译调试后,整理了一遍记录下来。

1.先安装依赖包libmemcached
wget https://soft.huayizhiyun.com/manage/directadmin/memcached/pecl-memcached/libmemcached-1.0.18.tar.gz
tar -zxvf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18
./configure --prefix=/usr/local/libmemcached --enable-sasl
make
make install
cd ..