Apache按天保存log日志设置方法

Apache 设置按天生成日志的方法,主要 %Y-%m-%d,修改 httpd-vhosts.conf 文件


    ServerAdmin [email protected]
    DocumentRoot "/opt/lampp/htdocs/uu/wwwroot"
    ServerName tj.sugh.net
    ServerAlias www.tj.sugh.net
    ErrorLog "|/opt/lampp/bin/rotatelogs /opt/lampp/logs/uu-error_log_%Y-%m-%d.log 86400 480"
    CustomLog "|/opt/lampp/bin/rotatelogs /opt/lampp/logs/uu-access_log_%Y-%m-%d.log 86400 480" common
  
    Options FollowSymLinks
    AllowOverride All
    Require all granted
   Order deny,allow
   Deny from allow


保存,然后重启

你可能感兴趣的:(Apache按天保存log日志设置方法)