问轩博客

展开菜单

nginx平滑升级或者添加新模块

nginx平滑升级或者添加新模块
已安装版本[root@ceshi100 nginx]# /opt/nginx/sbin/nginx -vnginx version: nginx/1.14.0升级版本[root@ceshi100 nginx]# wget http://nginx.org/download/nginx-1.15.0.tar.gz [root@ceshi100 nginx]# tar xf nginx-1.15.0.tar.gz [root@ceshi100 nginx]# cd ng...

nginx stream模块

nginx stream模块
The ngx_stream_core_module module is available since version 1.9.0. This module is not built by default, it should be enabled with the --with-stream configuration parameter.升级:可以下载新版本的,可以通过sbin/nginx -V 查看之前编译的的模块,解压新版本,...

Nginx屏蔽百度谷歌等搜索引擎蜘蛛方法

Nginx屏蔽百度谷歌等搜索引擎蜘蛛方法
‍‍‍‍在nginx的server字段中配置下面内容即可if ($http_user_agent ~* (baiduspider|googlebot|bing|sogou|yahoo)){return 503;}如果单独屏蔽百度蜘蛛就是if ($http_user_agent ~* baiduspider){return 503;}‍‍‍‍...

nginx与apache的相关插件安装

nginx与apache的相关插件安装
查看版本/application/apache/bin/apachectl -V/application/nginx/sbin/nginx -v/application/php/bin/php -vmysql直接登陆就可以看到查看编译的参数/application/nginx/sbin/nginx -V  #用大V/application/apache/build/config.nicegrep CONFIGURE_LINE /application/mysql/b...

nginx参数优化以及编译扩展模块

nginx参数优化以及编译扩展模块
nginx相关优化参数1.隐藏nginx版本号在nginx.conf配置文件中,http,server,location段添加server_tokens off;2.想要彻底修改nginx错误返回页面在编译安装之前修改nginx.h文件sed -n '13,17p' src/core/nginx.h#define NGINX_VERSION      "1.6.2"      #将...