查看编译参数:nginx -v
‘configure arguments: 配置参数./configure --help
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-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp python缓存
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp php缓存
--with-compat 启动动态模块兼容性
--user=nginx 用户
--group=nginx 组
--with-file-aio 使用nginx的aio特性会大大提高性能,比如图片站的特点是大量的读io操作,nginx aio不用等待每次io的结果,有助于并发处理大量io和提高nginx处理效率。aio的优点就是能够同时提交多个io请求给内核,然后直接由内核的io调度算法去处理这些请求(directio),这样的话,内核就有可能执行一些合并,节约了读取文件的处理时间。
--with-threads 多线程模块
--with-http_addition_module 追加文本内容
--with-http_auth_request_module 认证模块
--with-http_dav_module 增加上传PUT,DELETE.MKCOL:创建集合,copy和move方法)默认情况下为关闭
--with-http_flv_module nginx添加MP4,flv视频支持模块
--with-http_gunzip_module 压缩模块
--with-http_gzip_static_module 是 Nginx 配置中的一个选项,用于启用或禁用
当您启用此模块时,Nginx 会使用 gzip 压缩来压缩静态文件,并存储这些已压缩的文件。这有助于减少传输的数据量,从而加快页面加载速度并减少带宽使用
--with-http_mp4_module 多媒体模块
--with-http_random_index_module nginx显示随机页面模板
--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-mail 邮件客户端
--with-stream 负载均衡模块。nginx从1.9.0开始,新增加了一个stream模块,用来实现四层协议的转发、代理或者负载均衡等。