yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-develnginx
解压 tar xvzf nginx-1.14.0.tar.gz app
./configure ui
#此命令是指定nginx安装路径spa
./configure --user=nginx --group=nginx --prefix=/app/nginx-1.14.0/ --with-http_v2_module --with-http_ssl_module --with-http_sub_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre3d
make && make installblog
默认路径 ip
cd /usr/local/nginx/sbin ssl
./nginxopenssl
指定配置文件域名
/usr/local/nginx/sbin/nginx -c /app/nginx-1.14.0/conf/nginx.conf
nginx -s reload|reopen|stop|quit #从新加载配置|重启|中止|退出 nginx
修改nginx.conf文件
不一样域名,相同端口配置
同域名,根据域名后,项目名不一样,请求项目不一样
非80端口配置