Nginx官网:https://nginx.org
参考:
Nginx配置常用参数梳理
https://www.jb51.net/server/285538k8k.htm
nginx配置参数详解
https://blog.csdn.net/u013286192/article/details/136418472
Nginx 配置详解
https://www.runoob.com/w3cnote/nginx-setup-intro.html
查看nginx开启的模块功能
更新和安装所需的库
sudo apt-get update sudo apt-get install build-essential libpcre3 libpcre3-dev zlib1g-dev openssl libssl-dev
下载官网源码
wget https://nginx.org/download/nginx-1.26.0.tar.gz
解压
tar -xzvf nginx-1.26.0.tar.gz cd nginx-1.26.0
配置
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module sudo make sudo make install
创建全局链接
sudo ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx
常用命令查看:
nginx -h
查看版本号:nginx -v
查看编译参数:nginx -V
查看当前工作进程:nginx -s process
停止服务:nginx -s stop
安全停止服务:nginx -s quit
检查配置文件语法错误:nginx -t
重新加载配置 (不停止服务):nginx -s reload
常用模块
./configure \ --with-compat \ --with-debug \ --with-pcre-jit \ --with-http_ssl_module \ --with-http_stub_status_module \ --with-http_realip_module \ --with-http_auth_request_module \ --with-http_v2_module \ --with-http_dav_module \ --with-http_slice_module \ --with-threads \ --with-http_addition_module \ --with-http_gunzip_module \ --with-http_gzip_static_module \ --with-http_sub_module
根据 ip 统计请求信息
awk '{print \$1\}' nginx.access.log | sort | uniq -c | sort -n
标签:http,nginx,--,module,Nginx,源码,https,安装 From: https://www.cnblogs.com/fieldtianye/p/18160351