升级nginx,查看已经安装的模块,并隐藏或者修改版本号
升级前,查看已经安装的版本以及模块
[root@mail ~]# /opt/nginx/sbin/nginx -Vnginx version: nginx/0.5.34 built by gcc 3.4.6 20060404 (Red Hat 3.4.6-3)configure arguments: --prefix=/opt/nginx --sbin-path=/opt/nginx/sbin/nginx --conf-path=/opt/nginx/conf/nginx.conf --pid-path=/var/run/nginx/nginx.pid --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/opt/nginx/temp/proxy --http-fastcgi-temp-path=/opt/nginx/temp/fcgi --lock-path=/var/run/nginx/nginx.lock --with-http_ssl_module --with-http_sub_module --with-http_stub_status_module --with-debug
修改版本号:
[root@ns ~/nginx-1.7.8]#vim src/core/nginx.h
#define nginx_version 1007008 #define NGINX_VERSION "1.7.8" #define NGINX_VER "nginx/" NGINX_VERSION修改为 #define nginx_version 1007008 #define NGINX_VERSION "1.7.8" #define NGINX_VER "Power_nginx"
然后重新编译:
./configure --prefix=/opt/nginx \--sbin-path=/opt/nginx/sbin/nginx \--conf-path=/opt/nginx/conf/nginx.conf \--pid-path=/var/run/nginx/nginx.pid \--error-log-path=/var/log/nginx/error.log \--http-log-path=/var/log/nginx/access.log \--http-proxy-temp-path=/opt/nginx/temp/proxy \--http-fastcgi-temp-path=/opt/nginx/temp/fcgi \--lock-path=/var/run/nginx/nginx.lock \ --with-http_ssl_module \ --with-http_sub_module \ --with-http_gzip_static_module \ --with-http_stub_status_module \ --with-http_flv_module \--with-debug
make && make install
然后重新启动nginx
service nginx restart
再查看版本及模块信息
完成了。
转载于:https://blog.51cto.com/professor/1596058
升级nginx,查看已经安装的模块,并隐藏或者修改版本号相关推荐
- python 查看已经安装的模块_教你用Python查看模块的帮助文档,方法和帮助信息...
这里介绍下python自带的查看帮助功能,可以在编程时不中断地迅速找到所需模块和函数的使用方法 查看方法 通用帮助函数help() python中的help()类似unix中的man指令,熟悉后会对我 ...
- linux 查看是否安装perl模块
这里介绍两种linux中查看perl模块是否安装的方法,一种是对于单体的模块,一种是对于群体的. 单体验证: [root@root ~]# perl -MShell -e "print\&q ...
- Nginx查看、隐藏和修改版本号
查看Nginx版本号 报文头和默认的404页面会显示Nginx服务器的版本号 curl www.baidu.com -I HTTP/1.1 200 OK Accept-Ranges: bytes Ca ...
- 查看nginx版本和安装的模块
查看nginx版本 # nginx -v nginx version: nginx/1.12.2 查看nginx配置了哪些模块 # nginx -V nginx version: nginx/1.12 ...
- linux升级 nginx报错,Linux下升级nginx,编译安装nginx-sticky-module
添加一个nginx-sticky-module模块,可以防止session丢失,使用nginx sticky模块实现基于cookie的负载均衡. 注:建议去官网下载安装包 ${0}:安装包所在目录:$ ...
- Nginx 1.9 安装 ngx_pagespeed 模块
本文的原文连接是: http://blog.csdn.net/freewebsys/article/details/50479176 未经博主允许不得转载. 博主地址是:http://blog.csd ...
- 多模块Maven项目统一修改版本号
在编写多Module的Maven项目时,如果Module很多,并且存在复杂层级,那么修改项目版本号将会是一个大工程,我们需要去每个Module中修改当前Module的版本号,以及它依赖的parent的 ...
- php服务模块在nginx中的安装失败,在已安装的nginx中添加模块
1. 查看 nginx版本以及安装的模块 /usr/local/nginx/sbin/nginx -V configure arguments :这个是已安装的模块,这里是一个都没有 2.在安装包里重 ...
- linux下不卸载nginx安装第三方模块
背景: 使用apt一键安装了nginx,现在想安装nginx-rtmp-module模块 要求: 在不卸载nginx的情况下,重新编译安装nginx-rtmp-module模块 首先查看nginx版本 ...
最新文章
- 【课堂笔记系列】二进制
- 使用CNN分类签名和文本图像
- jQuery:在一个回调中处理多个请求
- Android构建流程——篇六
- 创新品类,N次方的市场爆炸力
- pipenv相关指令
- redis分布式锁小试
- 《构建之法》第十三章学习总结
- 这个没去大厂的程序猿,用 4 年时间证明自己做对了!
- c语言 二进制输出_C语言编译器
- 一文读懂 Java 工程师学习路线!
- Vc2008中如何为视图类添加消息响应
- discuz 门户diy实现翻页功能的修改记录
- Unity之Image Raw Image
- Linux显示以log结尾的日志文件
- shell脚本部署俄罗斯方块
- 国内洗地机品牌排行榜前十名有哪些?洗地机十大品牌排行榜介绍
- 天地图-第五篇-覆盖物
- 微服务--应对每秒上万并发下的参数优化实战(实战经验)
- mac设置开机启动app_Mac App无法启动? 这是解决方法