博客
关于我
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自动清理180天之前的日志
查看>>
Nginx虚拟主机配置
查看>>
Nginx虚拟目录配置文件(包含PHP配置与重写)
查看>>
Nginx访问控制_登陆权限的控制(http_auth_basic_module)
查看>>
nginx访问控制配置
查看>>
nginx负载均衡
查看>>
Nginx负载均衡
查看>>
Nginx负载均衡与动静分离架构实现
查看>>
Nginx负载均衡和F5的区别---系统运维工作笔记001
查看>>
nginx负载均衡和反相代理的配置
查看>>
nginx负载均衡器处理session共享的几种方法(转)
查看>>
nginx负载均衡的5种策略
查看>>
nginx负载均衡的5种策略(转载)
查看>>
nginx负载均衡的五种算法
查看>>
Nginx负载均衡详解
查看>>
Nginx负载均衡(upstream)
查看>>
nginx转发端口时与导致websocket不生效
查看>>
Nginx运维与实战(二)-Https配置
查看>>
Nginx部署_mysql代理_redis代理_phoenix代理_xxljob代理_websocket代理_Nacos代理_内网穿透代理_多系统转发---记录021_大数据工作笔记0181
查看>>
nginx部署本地项目如何让异地公网访问?服务器端口映射配置!
查看>>