         server {
                 listen 80;
                 listen 443;
                 server_name minio.com;

                 ignore_invalid_headers off;
                 client_max_body_size 0;
                 proxy_buffering off;

                 #access_log  /opt/nginx/logs/minio.com.log;
                 ######如果不需要加证书访问下面这些可以注销######
                 #ssl on;
                 #ssl_certificate       /opt/nginx/conf/cert/ssl/minio.com.pem;
                 #ssl_certificate_key   /opt/nginx/conf/cert/ssl/minio.com.key;
                 #ssl_session_cache shared:SSL:1m;
                 #ssl_session_timeout  10m;
                 #ssl_prefer_server_ciphers on;
                 #ssl_protocols SSLv3 SSLv2 TLSv1 TLSv1.1 TLSv1.2;
                 ######如果不需要加证书访问上面这些可以注销######

                 location / {
                   proxy_pass http://127.0.0.1:9001;
                   proxy_set_header X-Real-IP $remote_addr;
                   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                   proxy_set_header X-Forwarded-Proto $scheme;
                   proxy_set_header Host $http_host;
                   proxy_connect_timeout 300;
                   proxy_http_version 1.1;
                   proxy_set_header Connection "";
                   chunked_transfer_encoding off;
                 }

                 ###  /group1 修改为桶名字 桶名是什么这个转发名是什么 ###
                 location /group1 {
                   proxy_pass http://127.0.0.1:9000;
                   proxy_set_header X-Real-IP $remote_addr;
                   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                   proxy_set_header X-Forwarded-Proto $scheme;
                   proxy_set_header Host $http_host;
                   proxy_connect_timeout 300;
                   proxy_http_version 1.1;
                   proxy_set_header Connection "";
                   chunked_transfer_encoding off;
                 }

                   ### 这段脚本一定要加到server配置内部  ###
                   ### 且if要在access_log前面            ###
                   ###  否则set的变量将无法引用          ###
                   if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})") {
                             set $year $1;
                             set $month $2;
                             set $day $3;

                   }
                   ### /opt/nginx/logs 记得加 777 权限 ###
                   ### chmod 777 /opt/nginx/logs  ###
                   access_log  /opt/nginx/logs/minio.com-$year-$month-$day.log  main;
                   error_log   /opt/nginx/logs/error.log;
                   ###  vim /etc/crontab  # 设置定时任务自动生成日志  ###
                   ###  每天凌晨两点自动执行这个脚本  ###
                   ###  00 2 * * *  root  /opt/sh/ShanChu.sh  ###
                   ###  删除日志脚本在 /opt/ziyuan/Shell/YuMing/ShanChu.sh ###
                   ###  service crond restart  重启crontab ###
                   ###  /etc/init.d/cron restart  重启crontab ###

                   }


