实际开发中经常有根据请求参数来路由到不同请求处理者的情况,根据POST请求参数需要些nginx插件,这里主要简单介绍下如
原创
2022-06-16 08:38:08
2959阅读
https://docs.mongodb.com/getting-started/shell/query/ Overview You can use the find() method to issue a query to retrieve data from a collection in Mo
转载
2017-03-08 12:07:00
95阅读
2评论
因为公司业务需求用到rewrite 其中有一个是要把a.php?id=2重定向到b-2.html 开始简单的写为 rewrite "^/a(.*)?(.*)$" /b-$2.html permanent; 总是不能正确的301到b-2.html 查资料发现 重写只能针对请求的uri进行重写,/a.php问号后面的是请求参数,在nginx用$query_string表示,直接
原创
2011-11-18 01:48:16
2277阅读
FastCGI原理 FastCGI是一个运用于Http Server和动态脚本语言间通信的接口,多数流行的Http Server都支持FastCGI,包括Apache、Nginx和lighttpd等。同时,FastCGI也被许多脚本语言支持,其中就有PHP。FastCGI接口方式采用C/S结构,可以将HttP服务器和脚本解析服务器分开,同时在脚本解析服务器上启动一个或者多个脚本解析守护进
shell脚本自动安装nginxroot 权限安装[ $UID -ne 0 ] && echo "need to be root so that" && exit 1定义参数#接收nginx 版本参数
nginxVersion=$1下载wgetisInstallWget=`yum list installed | grep wget`
if [ $? -ne 0 ]
Nginx 是一个非常轻量的 Web 服务器,体积小、性能高、速度快等诸多优点。但不足的是也存在缺点,比如其产生的访问日志文件一直就是一个,不会自动地进行切割,如果访问量很大的话,将 导致日志文件容量非常大,不便于管理。当然了,我们也不希望看到这么庞大的一个访问日志文件,那需要手动对这个文件进行切割。在 Linux 平台上 Shell 脚本丰富,使用 Shell 脚本加 crontab
转载
2024-07-25 12:43:01
117阅读
文章目录nginxnginx反向代理nginx负载均衡rewrite重定向shellShell 简介Shell 分类图形界面 Shell(GUI Shell)命令行界面 Shell(CLI Shell)Shell执行shell编程几个常用命令grep命令详解cut命令详解sortuniq 去重重复的行seqtr命令 nginxnginx反向代理location ~ php$ {
proxy_p
转载
2024-03-01 19:28:46
43阅读
灰度发布,灰度发布(又名金丝雀发布)是指在黑与白之间,能够平滑过渡的一种发布方式。在其上可以进行A/B testing,即让一部分用户继续用产品特性A,一部分用户开始用产品特性B,如果用户对B没有什么反对意见,那么逐步扩大范围,把所有用户都迁移到B上面来。灰度发布可以保证整体系统的稳定,在初始灰度的时候就可以发现、调整问题,以保证其影响度。Nginx+Lua 实现灰度发布一、概念灰度发布概念按照一
Vue 打包上线后的缓存问题问题描述大家用vue脚手架搭建前端工程时,常被缓存问题所困扰,具体的表现就是,当程序版本升级时,用户因为缓存访问的还是老的页面,然后很多同学很暴力的直接在index.html中加入了这几行代码:<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-ca
转载
2024-10-23 11:20:18
55阅读
安装脚本:install_nginx.sh123456789101112131415161718192021222324252627282930313233343536373839404142434445464748#!/bin/bash#create by lhb#install nginx#download softpackagewget ftp://ftp.openssl.org/sourc
转载
精选
2014-05-09 09:58:46
352阅读
nginx编译安装 启动脚本 [root@m01 /scripts]# vim /scripts/nginx.sh #!/usr/bin/env bash #Author:xiaolang #Blog:https://www.cnblogs.com/xiaolang666 #Time:2020-11
原创
2021-07-29 09:41:12
351阅读
这个 shell 脚本可重复执行 完整源码放在最后 定义一个变量来存放 nginx 版本号version=1.15.4 nginx 下载地址:http://nginx.org/download/ 下列函数功能则是判断当前步骤是否执行成功,并将结果输出出来 创建 nginx 用户和用户组建议用大于 1000 的 GID 和 UID 号,表示普通用户这
转载
2024-05-06 10:21:13
338阅读
虚拟机重启错误原因:由于磁盘有损坏修复磁盘: step1:回车后输入root密码 step2:fsck /dev/sda2 step3:fix? yes step 4:rebootshell基础编程shell程序介绍 (1)shell程序时已文件形式存放批量的linux命令集合,该文件能够被shell解释执行,这种文件就是shell脚本程序,shell文件是文本文件 (2)shell程序通常由一段
转载
2024-06-09 19:23:24
77阅读
功能:shell脚本实现sftp自动登录并下载文件系统环境:centos7使用到的工具:lftp (安装方式 yum -y install lftp)lftp:lftp 是一个功能强大的下载工具,它支持访问文件的协议: ftp, ftps, http, https, hftp, fish.(其中ftps和https需要在编译的时候包含openssl库)。llftp的界面非常想一个shell: 有命
转载
2024-02-28 14:01:29
41阅读
1. 概要location /t {
default_type text/html;
echo abc;
replace_filter 'ab|abc' X;
}
location / {
# proxy_pass/fastcgi_pass/...
# caseless global substitution:
replace_filter '\
转载
2024-10-10 15:44:14
38阅读
#cat cutlog.sh
#!/bin/bash
logs_path=/usr/local/nginx/logs log目录
yesterday=$(date -d "yesterday" +%Y-%m-%d) 定义日期
mv ${logs_path}/www_access.log ${logs_path}/www_acce
原创
2011-11-24 13:58:27
464阅读
日志格式如下:
log_format iptables '"$remote_addr" "$time_local" "$request_uri" "$http_user_agent" "$http_refe
转载
2012-09-04 18:03:32
868阅读
#!/bin/bashdate=$(date "+%H:%M")date1=$(date +%F)date2=$(date +%F -d last-day)date3=$(date +%k)date4=$(date +%M)PID=/usr/local/nginx/logs/nginx.pidbak_dir=/usr/local/nginx/logs/log_bak/${dat
原创
2013-06-19 09:18:47
1303阅读
1.安装openrestyyum install yum-utils -y#安装yum工具箱yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo#添加openresty源yum install openresty -y#安装openresty,这个软件代替Nginx的echo "expo
原创
2022-04-26 11:44:49
3619阅读
#!/bin/bash#MODIFY:if [ `whoami` != "root" ];then echo "This script must be runing as root!!!" exit 71fiexport LC_ALL=en_US.UTF-8current_dir=$(cd `dirname $0` && pwd) #当前工作目录...
原创
2022-06-28 17:06:30
188阅读