本站的nginx反向代理设置

Linux | 2019-05-16 13:10:19 | 阅读 212 次 | 评论(0)
server {
    listen       80;
    listen       443 ssl;
    server_name  bbs.bccn.net;

    ssl_certificate /var/www/sslkey/bccn.net.cer;
    ssl_certificate_key /var/www/sslkey/bccn.net.key;
    ssl_protocols      TLSv1.1 TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers  on;

    charset gbk;

    gzip on;

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }

    location / {
        proxy_pass http://110.110.110.110:80;
        proxy_set_header    Cookie          $http_cookie;
        proxy_set_header    Host            $host;
        proxy_set_header    X-Real-IP       $remote_addr;
        proxy_set_header    X-Forwarded-for $remote_addr;
        proxy_set_header    X-Forwarded-Proto   $scheme;
        proxy_set_header    X-Forwarded-Ssl on;
        port_in_redirect off;
        proxy_connect_timeout 300;
    }
}
文章评论,共0条
游客请输入验证码
浏览1855405次
文章归档
最新评论
  • 静夜思:它下面的,直到ob_get_clean() 为止
  • 静夜思:9年了,当年解决这个问题的思路记忆犹新😊