1、配置
1.1、为ngixn添加功能模块
- nginx安装目录:/app/nginx-1.16.1
- nginx部署目录:/app/nginx
# 查看nginx已经安装的功能模块
/app/nginx/sbin/nginx -V
- 打印如下,--with 开头的都为模块
nginx version: nginx/1.16.1
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)
built with OpenSSL 1.0.2k 26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/app/weblogic/nginx/--with-http_ssl_module --with-stream
cd /app/nginx-1.16.1
# 重新配置nginx,添加需要的模块,并加上之前有的模块
./configure --prefix=/app/nginx/ --with-http_stub_status_module --with-http_sub_module --with-http_ssl_module --with-http_realip_module --with-stream
# 编译
make
mv /app/nginx/sbin/nginx /app/nginx/sbin/nginx_bak
cp /app/nginx-1.16.1/objs/nginx /app/nginx/sbin
## 查看模块安装情况 && 重启nginx
/app/nginx/sbin/nginx -V
/app/nginx/sbin/nginx && /app/nginx/sbin/nginx -s reload
2、命令
## 验证 nginx 配置文件语法
nginx -t -c <path-to-nginx.conf>
标签:命令,http,nginx,--,app,配置,sbin,module,Nginx
From: https://www.cnblogs.com/DeepInThought/p/17789045.html