博客
关于我
nginx编译参数详解1
阅读量:344 次
发布时间:2019-03-04

本文共 1621 字,大约阅读时间需要 5 分钟。

在实际安装nginx时,我们需要对nginx进行编译安装,编译时,会添加相应使用功能的参数。

举例内容:这里举例部分内容进行讲解,实际应用的时候按照所需内容进行编译安装。

./configure--prefix=/data/nginx --sbin-path=/data/nginx/sbin/nginx--conf-path=/data/nginx/conf/nginx.conf--error-log-path=/data/nginx/log/error.log--http-log-path=/data/nginx/log/access.log --pid-path=/data/nginx/log/pid/nginx.pid--lock-path=/data/nginx/log/lock/subsys/nginx --with-http_ssl_module--with-http_realip_module --with-http_addition_module --with-http_sub_module--with-http_dav_module --with-http_flv_module --with-http_gzip_static_module--with-http_stub_status_module --with-http_perl_module--with-ld-opt="-Wl,-E" --with-http_image_filter_module

1.相应参数讲解

--prefix:  指定安装目录
--sbin-path:  指定(执行)程序文件位置
--conf-path: 指向配置文件位置
--http-log-path: 指向http日志文件位置
--http-log-path: 指向http日志文件位置
--lock-path :指向lock文件(nginx.lock)(安装文件锁定,防止已安装完毕的文件件被别人利用,或自己误操作。)
--with-http_ssl_module: 启用ngx_http_ssl_module模块内容支持(使其支持https请求)
--with-http_realip_module :启用ngx_http_realip_module模块支持(这个模块允许从请求标头更改客户端的IP地址值,默认为关,这里添加此参数用于测试使用)
--with-http_sub_module: 启用ngx_http_sub_module支持(允许用一些其他文本替换nginx响应中的一些文本,支持文本替换使用)
--with-http_dav_module : 启用ngx_http_dav_module支持(增加PUT,DELETE,MKCOL创建集合、COPY 和 MOVE 方法)默认情况下为关闭,编译后可开启此功能
--with-http_flv_module : 启用ngx_http_flv_module支持(提供寻求内存使用基于时间的偏移量文件)
--with-http_gzip_static_module: 启用ngx_http_gzip_static_module支持(在线实时压缩输出数据流文件,可以使大文件在访问时压缩加快访问速度)
--with-http_stub_status_module : 启用ngx_http_stub_status_module支持(获取 nginx 自上次启动以来的工作状态)
--with-http_perl_module: 启用ngx_http_perl_module支持(该模块使nginx可以直接使用perl或通过ssi调用 perl)
--with-ld-opt="-Wl,-E" : 设置连接文件参数
--with-http_image_filter_module: 第三方模块(模块生成缩略图)

转载地址:http://hbie.baihongyu.com/

你可能感兴趣的文章
nginx代理地图服务--离线部署地图服务(地图数据篇.4)
查看>>
Nginx代理外网映射
查看>>
Nginx代理模式下 log-format 获取客户端真实IP
查看>>
Nginx代理解决跨域问题(导致图片只能预览不能下载)
查看>>
Nginx代理访问提示ERR_CONTENT_LENGTH_MISMATCH
查看>>
Nginx代理配置详解
查看>>
Nginx代理静态资源(gis瓦片图片)实现非固定ip的url适配网络环境映射ip下的资源请求解决方案
查看>>
Nginx代理静态资源(gis瓦片图片)实现非固定ip的url适配网络环境映射ip下的资源请求解决方案
查看>>
nginx反向代理
查看>>
Nginx反向代理
查看>>
nginx反向代理、文件批量改名及统计ip访问量等精髓总结
查看>>
Nginx反向代理与正向代理配置
查看>>
Nginx反向代理及负载均衡实现过程部署
查看>>
Nginx反向代理是什么意思?如何配置Nginx反向代理?
查看>>
nginx反向代理解决跨域问题,使本地调试更方便
查看>>
Nginx反向代理配置
查看>>
Nginx启动SSL功能,并进行功能优化,你看这个就足够了
查看>>
nginx启动脚本
查看>>
Nginx在Windows上和Linux上(Docker启动)分别配置基本身份认证示例
查看>>
Nginx在Windows下载安装启动与配置前后端请求代理
查看>>