Apache itself has the ability to automatically cut log files, and Nginx itself can't split logs by day. It needs to be automatically split by script.
Split the log through the shell script +crontab:
#vi cut_nginx_access.log
#!/bin/bashlogs_path=”/opt/nginx-h264/logs” #######This is the directory where my nginx log file is located date=$(date -d “yesterday” +”%Y-%m-%d”) #######前前The time of day, the format is year-month-day mv ${logs_path}/access.log ${logs_path}/access_$date.log ###### Rename the log file kill -USR1 `cat /with yesterday's date Opt/nginx-h264/logs/nginx.pid` #######Regenerate log files
#crontab -e
00 00 * * * sh /opt/cut_nginx_access. Log#service crond restart
directory summary: /: root directory, generally only the directory under the root directory, do not
Today, I suddenly had a whim and wanted to experience Mac Os. I heard that the virtual machine inst
Installing VMware in Linux System Due to the project needs, you need to virtuali
Computer Store News: first Linux systems for flat panel launch For those who have tired of the N
The principle and function of Redo log
Introduction to the tens of millions of concurrent HAproxy balanced load systems
Centos install apache detailed tutorial
How to add sudo account in CentOS system
Set the script to self-starting under Linux system
How to Migrate Account Information Between Linux Servers
Clean up memory and Cache method under Linux /proc/sys/vm/drop
Novice to see: Linux system startup time limit optimization
Startup tutorial for multiple Oracle instances under Linux platform
What should I do if the front panel headphone jack can't be used?
Remove those settings for XP power-on passwords
Win8 language bar location setting tutorial
Xbox encounters fake applications in the Win10 store will become a problem
Microsoft's next-generation "IE12" browser first experience
Install three systems with Grub does not conflict