yum install gcc pcre-devel zlib-devel openssl-devel wget http://nginx.org/download/nginx-1.6.0.tar.gz ./configure \ --with-http_stub_status_module \ --with-http_ssl_module \ --with-http_spdy_module \ --with-http_realip_module \ --with-http_sub_module \ --with-http_gzip_static_module \ --with-ipv6 \ --add-module=/root/down/ngx_http_substitutions_filter_module-master make make install
note:now it's install finish already! then start nginx!
/usr/local/nginx/sbin/nginx
如果在ubuntu系统上
sudo apt-get install gcc libpcre++-dev libssl-dev make
# NginxHttpRealIpModule
set_real_ip_from 192.168.1.0/24;
set_real_ip_from 192.168.2.1;
real_ip_header X-Real-IP;