通過logrotate輪轉nginx日志
https://blog.51cto.com/wangzz/1766821
NGINX will re-open its logs in response to the USR1 signal.
https://www.nginx.com/resources/wiki/start/topics/examples/logrotation/
nginx日志切割
http://www.nginx.cn/255.html
https://www.oschina.net/question/258792_173849
logrotate作為一個/etc/cron.daily/logrotate任務每日定時執(zhí)行贝搁。
你往/etc/logrotate.d/下添加配置文件 logrotate執(zhí)行時會自動根據(jù)配置文件進行日志歸檔。
比如apt-get安裝的Nginx官方源的日志歸檔配置文件/etc/logrotate.d/nginx內容為:
##########################################
/var/log/nginx/*.log {
? ? ? ? daily
? ? ? ? missingok
? ? ? ? rotate 52
? ? ? ? compress
? ? ? ? delaycompress
? ? ? ? notifempty
? ? ? ? create 640 nginx adm
? ? ? ? sharedscripts
? ? ? ? postrotate
? ? ? ? ? ? ? ? [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
? ? ? ? endscript
}
#############################################
配置說明:
daily: 日志文件每天進行滾動
missingok: 如果找不到這個log檔案,就忽略過去
rotate: 保留最進52次滾動的日志
compress: 通過gzip壓縮轉儲以后的日志
delaycompress: 和compress一起使用時,轉儲的日志文件到下一次轉儲時才壓縮
notifempty: 如果是空文件的話,不轉儲
create mode owner group:轉儲文件,使用指定的文件模式創(chuàng)建新的日志文件
sharedscripts: 運行postrotate腳本(該腳本作用為讓nginx重新生成日志文件)
postrotate/endscript: 在轉儲以后需要執(zhí)行的命令可以放入這個對,這兩個關鍵字必須單獨成行
#####################################################################################
Nginx日志文件配置與切割
https://www.cnblogs.com/try-better-tomorrow/p/5103145.html
http://www.361way.com/logrotate-nginx/2672.html
nginx 在配置文件中設置日志按年枪狂、月、日分割
https://blog.csdn.net/qq_25934401/article/details/82803028
Module ngx_http_log_module
http://nginx.org/en/docs/http/ngx_http_log_module.html
NGINX按天生成日志文件的簡易配置
https://www.bbsmax.com/A/kPzOQvgx5x/
https://github.com/fcambus/nginx-resources/issues/12
簡單搞定Nginx日志分割
https://juejin.im/entry/5c413839f265da616624ba82
nginx啟用stream日志配置文件
https://www.cnblogs.com/cheyunhua/p/8823496.html
https://blog.csdn.net/ffzhihua/article/details/80981900
https://www.cnblogs.com/felixzh/p/8707102.html
nginx的log而姐、upstream和server
https://my.oschina.net/u/2246410/blog/618798
zabbix 應用系列之nginx tcp stream監(jiān)控
http://blog.chinaunix.net/uid-20099692-id-5762538.html
Nginx1.12做TCP轉發(fā)(端口轉發(fā))并記錄日志
https://www.zifangsky.cn/1019.html
Socat一鍵腳本悄蕾,支持TCP和UDP轉發(fā)
https://www.cmsky.com/socat-onekey/
http://brieflyx.me/2015/linux-tools/socat-introduction/
https://www.hi-linux.com/posts/61543.html
一款好用的內網(wǎng)穿透工具FRP
https://mp.weixin.qq.com/s/8HeeDC5x5xozElN8GzQLLw
HAProxy 代理負載均衡
https://www.cnblogs.com/yexiaochong/p/6131327.html
http://www.cnblogs.com/f-ck-need-u/p/7576137.html
mysql、mariadb安裝和多實例配置
http://www.cnblogs.com/f-ck-need-u/p/7590376.html
安裝MySQL(MariaDB)
http://www.cnblogs.com/f-ck-need-u/p/7642992.html
透明代理卜范、正向代理刹悴、反向代理的區(qū)別說明
https://www.cnblogs.com/f-ck-need-u/p/9739870.html