Nginx log cut

1. Write a log script

#!/bin/bash
#This script needs to be run at 00:00 every day

#Nginx log file Storage path
logs_path=”/usr/local/nginx/logs”

#Create folder
mkdir -p ${logs_pat