首页
关于
归档
朋友
壁纸
留言
API平台
告白墙
更多
休闲游戏
留言板
练字贴
Layui手册
Search
1
【PHP】PHPoffice/PHPSpreadsheet读取和写入Excel
1,339 阅读
2
【Git】No tracked branch configured for branch master or the branch doesn't exist.
1,039 阅读
3
【Layui】控制页面元素展示隐藏
860 阅读
4
【composer】composer常用命令
787 阅读
5
【PHP】PHP实现JWT生成和验证
769 阅读
默认分类
PHP
ThinkPHP
Laravel
面向对象
设计模式
算法
基础
网络安全
Web
HTML
CSS
JavaScript
jQuery
Layui
VUE
uni-app
Database
MySQL
Redis
RabbitMQ
Nginx
Git
Linux
Soft Ware
Windows
网赚
Go
登录
Search
标签搜索
PHP
函数
方法
类
MySQL
ThinkPHP
OOP
JavaScript
Layui
Web
Linux
Array
设计模式
Git
PHPSpreadsheet
PHPoffice
排序算法
基础
面试题
Windows
小破孩
累计撰写
223
篇文章
累计收到
33
条评论
首页
栏目
默认分类
PHP
ThinkPHP
Laravel
面向对象
设计模式
算法
基础
网络安全
Web
HTML
CSS
JavaScript
jQuery
Layui
VUE
uni-app
Database
MySQL
Redis
RabbitMQ
Nginx
Git
Linux
Soft Ware
Windows
网赚
Go
页面
关于
归档
朋友
壁纸
留言
API平台
告白墙
休闲游戏
留言板
练字贴
Layui手册
搜索到
2
篇与
的结果
2022-08-29
【Nginx】Nginx泛解析配置-站群推广
通常情况下,我们新建一个二级域名都需要去域名提供商的控制面板新建记录,比如我现在有个baidu.com的域名,但是我有好几家分公司,分别是1.baidu.com,2.baidu.com,3.baidu.com。。。。这样就需要建很多二级域名,显然很麻烦,我们只需要在控制台建一个解析记录,使用*就行,如下图新建解析记录然后nginx的配置如下server { listen 80; # 这是你的域名 server_name *.home.baidu.top; location / { # 泛域名开始配置 if ( $host ~* (.*)\.(.*)\.(.*)\.(.*) ) { set $domain $1; #获取当前的 域名前缀 } # 这里的domain就是获取当前域名前缀,然后指向到该前缀名称的目录 root /home/customerpage/$domain; index index.html index.htm; } }看到如上配置我是指定到我/home/customerpage/目录下的如图下面新建两个子目录每个目录里都有一个html页面然后我就需要这样访问第一个 和文件名一样 hejie.home.baidu.tophttps://www.cnblogs.com/hjieone/p/12323405.html
2022年08月29日
301 阅读
0 评论
0 点赞
2022-06-17
【Nginx】Nginx Log日志统计分析常用命令
IP相关统计统计IP访问量(独立ip访问数量) awk '{print $1}' access.log | sort -n | uniq | wc -l 查看某一时间段的IP访问量(4-5点) grep "07/Apr/2017:0[4-5]" access.log | awk '{print $1}' | sort | uniq -c| sort -nr | wc -l 查看访问最频繁的前100个IP awk '{print $1}' access.log | sort -n |uniq -c | sort -rn | head -n 100 查看访问100次以上的IP awk '{print $1}' access.log | sort -n |uniq -c |awk '{if($1 >100) print $0}'|sort -rn 查询某个IP的详细访问情况,按访问频率排序 grep '127.0.01' access.log |awk '{print $7}'|sort |uniq -c |sort -rn |head -n 100 页面访问统计查看访问最频的页面(TOP100) awk '{print $7}' access.log | sort |uniq -c | sort -rn | head -n 100 查看访问最频的页面([排除php页面】(TOP100) grep -v ".php" access.log | awk '{print $7}' | sort |uniq -c | sort -rn | head -n 100 查看页面访问次数超过100次的页面 cat access.log | cut -d ' ' -f 7 | sort |uniq -c | awk '{if ($1 > 100) print $0}' | less 查看最近1000条记录,访问量最高的页面 tail -1000 access.log |awk '{print $7}'|sort|uniq -c|sort -nr|less每秒请求量统计统计每秒的请求数,top100的时间点(精确到秒) awk '{print $4}' access.log |cut -c 14-21|sort|uniq -c|sort -nr|head -n 100每分钟请求量统计统计每分钟的请求数,top100的时间点(精确到分钟) awk '{print $4}' access.log |cut -c 14-18|sort|uniq -c|sort -nr|head -n 100每小时请求量统计统计每小时的请求数,top100的时间点(精确到小时) awk '{print $4}' access.log |cut -c 14-15|sort|uniq -c|sort -nr|head -n 100性能分析在nginx log中最后一个字段加入$request_time 列出传输时间超过 3 秒的页面,显示前20条 cat access.log|awk '($NF > 3){print $7}'|sort -n|uniq -c|sort -nr|head -20 列出php页面请求时间超过3秒的页面,并统计其出现的次数,显示前100条 cat access.log|awk '($NF > 1 && $7~/\.php/){print $7}'|sort -n|uniq -c|sort -nr|head -100蜘蛛抓取统计统计蜘蛛抓取次数 grep 'Baiduspider' access.log |wc -l 统计蜘蛛抓取404的次数 grep 'Baiduspider' access.log |grep '404' | wc -lTCP连接统计查看当前TCP连接数 netstat -tan | grep "ESTABLISHED" | grep ":80" | wc -l 用tcpdump嗅探80端口的访问看看谁最高 tcpdump -i eth0 -tnn dst port 80 -c 1000 | awk -F"." '{print $1"."$2"."$3"."$4}' | sort | uniq -c | sort -nr
2022年06月17日
129 阅读
0 评论
0 点赞