zoukankan      html  css  js  c++  java
  • windows 下 nginx log 分割

     默认 nginx 不支持 log自动分割

     
      windows下 解决方案:
     
     1、首先创建bat脚本 split_log.bat , 并保存在nginx 目录下:
    @echo off
    rem 查看系统中正在运行的nginx进程
    rem tasklist /fi "imagename eq nginx.exe"
    rem 备份并根据时间重命名访问日志文件
    NET STOP "nginx"
    set "cmdstr=move C:
    ginxlogsaccess.log C:
    ginxlogsHisaccess.%date:~0,4%-%date:~5,2%-%date:~8,2%.log
    call %cmdstr%"
    rem 备份并根据时间重命名错误日志文件
    set "cmdstr=move C:
    ginxlogserror.log C:
    ginxlogsHiserror.%date:~0,4%-%date:~5,2%-%date:~8,2%.log
    call %cmdstr%"
    rem re-opening log files
    NET START "nginx"
    

      

     2、 创建计划任务
     
         1)
    2、
     
    3、
     

     
     
     
     
     





  • 相关阅读:
    [译]GLUT教程
    [译]GLUT教程
    [译]GLUT教程
    [译]GLUT教程
    [译]GLUT教程
    [译]GLUT教程
    [译]GLUT教程
    表单
    列表、表格与媒体元素
    HTML5基础
  • 原文地址:https://www.cnblogs.com/tangruixin/p/5960449.html
Copyright © 2011-2022 走看看