server {
    listen  80;
    server_name  open.work.weixin.qq.com;
    resolver 114.114.114.114 223.5.5.5 valid=3600s;

    access_log   /var/log/nginx/open.work.weixin.qq.com.access.log main;
    error_log    /var/log/nginx/open.work.weixin.qq.com.error.log;

    location / {
        index index.html;
        proxy_pass http://open.work.weixin.qq.com;
        proxy_redirect off;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        # proxy_set_header Host $host;
        proxy_set_header X-Forwarded-proto https;
    }
}

server{
    listen 443 ssl;
    server_name  open.work.weixin.qq.com;
    resolver 114.114.114.114 223.5.5.5 valid=3600s;
    access_log   /var/log/nginx/open.work.weixin.qq.com.access.log;
    error_log    /var/log/nginx/open.work.weixin.qq.com.error.log;

    ssl_certificate            /etc/nginx/conf.d/cert/all.xiexianbin.cn.bundle.crt;
    ssl_certificate_key        /etc/nginx/conf.d/cert/all.xiexianbin.cn.key;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 10m;
    ssl_ciphers HIGH:!aNULL:!MD5;

    location / {
        index index.html;
        proxy_pass https://open.work.weixin.qq.com;
        proxy_redirect off;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        # proxy_set_header Host $host;
        proxy_set_header X-Forwarded-proto https;
        proxy_buffers 8 512k;
        proxy_buffer_size 2024k;
        proxy_busy_buffers_size 2024k;
        proxy_read_timeout 3000;
    }
}
