1.yum install pcre*
2.wget http://nginx.org/download/nginx-1.7.8.tar.gz
3.tar -zxvf nginx-1.7.8.tar.gz
4. ./configure --prefix=/usr/local/nginx-1.7.8 --with-http_ssl_module --with-http_spdy_module --with-http_stub_status_module --with-pcre
5. make
6. make install
7. /usr/local/nginx-1.7.8/sbin/nginx -s reload //重启
解决nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed错误
解决方法:
[root@localhost nginx]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
nginx非80端口配置 外网无法访问
解决办法
执行 service iptables stop 把防火墙关闭