nginx -V 可以查看nginx有哪些模块
configure arguments:
--prefix=/etc/nginx #安装目录
--sbin-path=/usr/sbin/nginx #执行文件目录
--modules-path=/usr/lib64/nginx/modules #模块目录
--conf-path=/etc/nginx/nginx.conf #主配置目录
--error-log-path=/var/log/nginx/error.log #错误日志
--http-log-path=/var/log/nginx/access.log #访问日志
--pid-path=/var/run/nginx.pid #程序ID
--lock-path=/var/run/nginx.lock #锁路径,防止重复启动nginx
--http-client-body-temp-path=/var/cache/nginx/client_temp #缓存
--http-proxy-temp-path=/var/cache/nginx/proxy_temp #代理缓存
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp #PHP缓存
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp #Python缓存
--http-scgi-temp-path=/var/cache/nginx/scgi_temp
--user=nginx #启动用户
--group=nginx #组
--with-compat #启动动态模块兼容性
--with-file-aio #异步非阻塞模块,处理大量io和提高nginx处理效率
--with-threads #多线程模块
--with-http_addition_module #响应之前或之后追加文本内容
--with-http_auth_request_module #认证模块
--with-http_dav_module #让网站支持上传下载
--with-http_flv_module #nginx添加MP4、flv视频支持模块
--with-http_gunzip_module #压缩模块
--with-http_gzip_static_module
--with-http_mp4_module #多媒体模块
--with-http_random_index_module #随机主页模块
--with-http_realip_module #代理后nginx获取真实ip模块
--with-http_secure_link_module #nginx安全下载模块
--with-http_slice_module #nginx中文文档
--with-http_ssl_module #安全模块
--with-http_stub_status_module #访问状态
--with-http_sub_module #nginx替换网站响应内容
--with-http_v2_module
--with-mail #邮件模块
--with-mail_ssl_module
--with-stream #负载均衡模块
--with-stream_realip_module
--with-stream_ssl_module
--with-stream_ssl_preread_module
CPU优化参数
--with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'