Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
[carsi@www ~]$ sudo vi /etc/logrotate.d/nginx
/var/log/nginx/*log {
    create 0664 nginx root
    daily
    rotate 180
    missingok
    notifempty
    compress
    sharedscripts
    postrotate
        /bin/kill -USR1 `cat /run/nginx.pid 2>/dev/null` 2>/dev/null || true
    endscript
}


4. 检查是否只允许CARSI联盟访问获取学校日志

       查看/etc/nginx/nginx.conf 文件中,location /auditlog段,是否有如下配置(只允许CARSI联盟IP:115.27.243.6 抓取学校idp的日志):

Code Block
languagebash
location /auditlog {
			real_ip_header X-Forwarded-For;
			set_real_ip_from 0.0.0.0/0;
			real_ip_recursive on;
			allow 115.27.243.6;
			deny all;
        }


    

注意:如果学校已经采购日志采集和分析系统,建议将CARSI日志集中存储到日志系统。