nginx logs

This commit is contained in:
Lulzette 2022-01-09 20:31:42 +00:00
parent da6419167a
commit eed6cc73a6
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,6 @@
<html> <html>
<body> <body>
<a href="basic.sh">wget -q -O - otp-bash.tw1.ru/basic.sh | bash</a> <a href="basic.sh">wget -q -O - otp-bash.tw1.ru/basic.sh | bash</a>
<a href="nginx.sh">wget -q -O - otp-bash.tw1.ru/nginx.sh | bash</a>
</body> </body>
</html> </html>

3
src/nginx.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
echo "- Sort by IP"
cat /var/log/nginx/access.log | awk '{print $1}' | sort | uniq -c | sort -hr | head -n 30