本站的nginx反向代理设置

作者在 2019-05-16 13:10:19 发布以下内容
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;
    }
}
Linux | 阅读 1331 次
文章评论,共0条
游客请输入验证码
浏览2893672次
文章归档
最新评论
  • 静夜思:-1是多核
  • 时光拾荒者:CtrlCV还是强的😝
  • 硬识岩丝:解决了,太感谢了~