ctfshow-web ctfshow nginx shell

nginx 日志配置

示例 log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_fo ......
nginx 日志

Nginx 常用的基础配置(web前端相关方面)

基础配置 user root; worker_processes 1; events { worker_connections 10240; } http { log_format '$remote_addr - $remote_user [$time_local] ' '"$request" $s ......
前端 方面 常用 基础 Nginx

nginx通过判断参数值最后两位转发到不同后端服务

方案1 使用全局变量$args location /test { default_type text/html; # 获取 user_id 参数值 if ($args ~* "user_id=(\d+)") { set $user_id $1; } # 对最后两位数进行正则匹配 if ($user_ ......
参数 nginx

shell 中怎样去除数据中^M 字符

这个符号^M在Linux文本文件中能看出来,在Windows系统下看不出来,因为这是windows系统下的回车换行符号。 有2中方法可以去掉这个回车换行符号。 第一种是全文替换,第二中是先搜索字符串,然后用sed命令替换。 方法一**:** 用vim打开文件,输入以下命令 vim filename ......
字符 数据 shell

Shell_4

流程控制: #Sh的流程控制不可为空,else分支如果没有语句执行,就不用写这个else if: if condition then command1 command2 ... commandN fi #也可写成一行:if[condition];then command;fi if else: if ......
Shell

Linux 中 shell 脚本实现根据gff统计每一个基因的转录本数目

001、生成基因名称的列表 awk -F "\t" '$3 == "gene" && $NF ~ /gene=/ {print $NF}' chr1.gff | sed 's/\(.*\)\(gene=[^;]\+\)\(.*\)/\2/' | sort | uniq > gene.list 002 ......
数目 脚本 基因 Linux shell

Nginx

如果你想在 Nginx 中创建一个反向代理,在代理请求时同时移除匹配的路径,可以使用 proxy_pass 指令和正则表达式来实现。 以下是一个示例配置,假设你想将 http://example.com/app/ 下的所有请求代理到 http://backend:8080/,但是从代理请求中移除 / ......
Nginx

Nginx的正则表达式

^~ 标识符后面跟一个字符串。Nginx将在这个字符串匹配后停止进行正则表达式的匹配(location指令中正则表达式的匹配的结果优先使用),如:location ^~ /images/,你希望对/images/这个目录进行一些特别的操作,如增加expires头,防盗链等,但是你又想把除了这个目录的 ......
正则 表达式 Nginx

Nginx同时转发俩个443域名网站【转】

1、先去下载nginx,https证书 https://blog.csdn.net/Tomwildboar/article/details/92099792 2、配置nginx(多个的话,直接下面这个图片多配置两次就好了) nginx.conf代码 复制进来老是报错,这里就直接粘贴图片 配置完后无法 ......
同时 域名 Nginx 网站 443

shell 字符串截取

Shell 截取字符串通常有两种方式:从指定位置开始截取和从指定字符(子字符串)开始截取。 从指定位置开始截取 这种方式需要两个参数:除了指定起始位置,还需要截取长度,才能最终确定要截取的字符串。既然需要指定起始位置,那么就涉及到计数方向的问题,到底是从字符串左边开始计数,还是从字符串右边开始计数。 ......
字符串 字符 shell

shell计算2

bc命令 bc命令当作计算器来用的,命令行的计算器 #交互式的操作,小数的计算 bc命令结合管道符来计算数学 ......
shell

Shell_2

传递参数: 我们可以在执行 Shell 脚本时,向脚本传递参数,脚本内获取参数的格式为:$n。n 代表一个数字,1 为执行脚本的第一个参数,2 为执行脚本的第二个参数,以此类推…… #!/bin/bash echo "Shell 传递参数实例!"; echo "第一个参数为:$1"; echo "参 ......
Shell

Rocky Linux:编译安装nginx 1.24.0(Rocky Linux 9.1)

一,官网: http://nginx.org/ 如图: 二,下载并解压 下载: [root@img nginx]# wget http://nginx.org/download/nginx-1.24.0.tar.gz 解压: [root@img nginx]# tar -zxvf nginx-1.2 ......
Rocky Linux nginx 9.1 24

nginx部署vue项目显示空白页

报错提示: index-fbb90c85.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". ......
空白 项目 nginx vue

安装docker和docker-compose的shell脚本(Centos7版本)

在执行脚本之前,我们需要先做两件事: 避免防火墙与docker产生冲突,应先关闭防火墙。 shell # 去掉防火墙的开机自启动 systemctl disable firewalld.service # 关闭防火墙 systemctl stop firewalld.service 国内拉取dock ......
docker docker-compose 脚本 compose Centos7

shell输出台阶状图形

shell输出台阶状图形 程序如下: #!/bin/bash rows=4 for (( i=1; i<=rows; i++ )) do for (( j=1; j<=i; j++ )) do echo -n "| " done echo -n "_" echo done # |_ # ||_ ......
台阶 图形 shell

shell程序输出数字塔

shell程序输出数字塔 如图所示: #!/bin/bash rows=4 for (( i=1; i<=rows; i++ )) do for (( j=1; j<=i; j++ )) do echo -n "* " done echo done for (( i=1; i<=rows; i++ ......
数字 程序 shell

shell输出星星三角阵

shell输出星星三角阵 要求输出 程序如下 #!/bin/bash rows=4 for (( i=1; i<=rows; i++ )) do for (( j=1; j<=i; j++ )) do echo -n "* " done echo done for (( i=1; i<=rows; ......
星星 shell

shell脚本实现人机石头剪刀布游戏

shell脚本实现人机石头剪刀布游戏 #!/bin/bash # game=(石头 剪刀 布) num=$((RANDOM%3)) # computer=${game[$num]}#通过随机数获取计算机的出拳 #出拳的可能性保存在一个数组中,game[0],game[1],game[2]分别是 3 ......
人机 脚本 石头 shell

shell排列3个整数

用户输入3个整数,脚本根据数字大小依次升序输出3个数字 #!/bin/bash echo "Please enter three integers:" read -r num1 num2 num3 echo "Sorted integers in ascending order:" echo "$n ......
整数 shell

【数据库测试】【shell脚本】查询同一个SQL执行多次,并统计每次耗时

场景说明 在数据库查询中会常见cold run与hot run,hot run是指将同一个SQL连续运行多遍。 运行脚本创建一个run.sh直接复制如下脚本 - 注意修改数据库的连接IP与密码等- queries2.sql 存放查询的SQL,请将queries2.sql 文件与run.sh放在同一个 ......
脚本 数据库 数据 shell SQL

Kubernetes 使用 Ingress-nginx 实现灰度发布功能

推荐阅读Helm3(K8S 资源对象管理工具)视频教程:https://edu.csdn.net/course/detail/32506Helm3(K8S 资源对象管理工具)博客专栏:https://blog.csdn.net/xzk9381/category_10895812.html本文原文链接 ......

nginx: [emerg] host not found in upstream "mirrors.estc.edu.cn" in /usr/local/nginx/conf/nginx.conf:154

配置: server { listen 7777; server_name localhost; location / { proxy_pass https://mirrors.estc.edu.cn/; } } 修改了dns和host,都不能解决。 但是直接访问 http://mirrors.es ......
nginx conf quot upstream mirrors

Nginx+uwsgi+django 搭建web服务器

1、下载安装相关软件 centos环境下安装: 安装组件: yum groupinstall "Development tools" yum install zlib-devel bzip2-devel pcre-devel openssl-devel ncurses-devel sqlite-de ......
服务器 django Nginx uwsgi web

centos7设置nginx开机自启

3、配置nginx开机启动 切换到/lib/systemd/system/目录,创建nginx.service文件vim nginx.service # cd /lib/systemd/system/ # vim nginx.service 文件内容如下: [Unit] Description=ng ......
centos7 centos nginx

shell脚本发送多种curl命令

for id in {1..5}do sh -c 'curl -l -H "Content-type: application/json" -X POST "http://127.0.0.1:8909/common/amethod?visitId=1874747&visitNum=1279367&p ......
脚本 多种 命令 shell curl

Nginx

学习Nginx这一篇就够了 (qq.com) ......
Nginx

Nginx实现只允许某个特定网址跳转过来的访问请求

可以通过Nginx的ngx_http_referer_module模块来实现。 ngx_http_referer_module模块可以检查HTTP请求头中的Referer字段,该字段指示了请求是从哪个URL跳转而来的。您可以配置Nginx,使其仅允许从特定网址跳转过来的请求通过,而拒绝来自其他网址的 ......
网址 Nginx

使用 shell 脚本自动申请进京证 (六环外) —— debug 过程

写好的自动办理六环外进京证脚本跑不通,总是返回办理业务人数较多 (500) 错误,Charles / VNET 抓包、android 交叉编译 jq、升级 curl…都不起作用,最终还是神奇的 adb shell 帮了大忙,最后定位到根因,居然是用 shell 字符串长度作为数据长度导致的,这错误犯... ......
脚本 过程 shell debug

shell自动化脚本,启动、停止应用程序

#!/usr/bin/env bash # 常量初始化 set_runtime_vars(){ # 日期时间 Now_Date=`date +"%Y-%m-%d %H:%M:%S"` # 服务状态 Service_Status=( "服务已开启" "服务已停止" ) # 动作状态 Action_St ......
应用程序 脚本 程序 shell