侧边栏壁纸
博主头像
WinJay博主等级

博观而约取 厚积而薄发

  • 累计撰写 333 篇文章
  • 累计创建 168 个标签
  • 累计收到 2 条评论

目 录CONTENT

文章目录

Halo WinJay Nginx Configure

WinJay
2021-11-04 / 0 评论 / 0 点赞 / 36 阅读 / 2,290 字 / 正在检测是否收录...
温馨提示:
本文最后更新于 2021-12-15,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

Halo WinJay Nginx Configure

upstream WinJay {
    server 172.17.136.7:8090;
}


server {

    listen 443 ssl;
    server_name winjay.cn www.winjay.cn;
    ssl_certificate /etc/nginx/conf.d/ssl/winjay.cn.pem;
    ssl_certificate_key /etc/nginx/conf.d/ssl/winjay.cn.key;
    ssl_session_timeout 5m;
    ssl_prefer_server_ciphers on; 
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
#    ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;


    client_max_body_size 1024m;
    location / {
       proxy_pass http://WinJay;
       proxy_set_header   HOST             $host;
       proxy_set_header   X-Real-IP        $remote_addr;
       proxy_set_header   X-Forwarded-Proto $scheme;
       proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
#       Proxy Settings
       proxy_redirect     off;
       proxy_set_header   Connection       close;
       proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
       proxy_max_temp_file_size 0;
       proxy_connect_timeout      90;
       proxy_send_timeout         90;
       proxy_read_timeout         90;
       proxy_buffer_size          4k;
       proxy_buffers              4 32k;
       proxy_busy_buffers_size    64k;
      }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
}

server {
    listen 80;
    server_name www.winjay.cn winjay.cn;
#    ssl_certificate conf.d/ssl/winjay.cn.pem;
#    ssl_certificate_key conf.d/ssl/winjay.cn.key;
#    ssl_session_timeout 5m;
#    ssl_prefer_server_ciphers on; 
#    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
##    ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
#    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;


    location / {
#	return	301 https://$server_name$request_uri; #强制重定向到https协议
	return	301 https://winjay.cn$request_uri; #强制重定向到https协议
    }
    error_page  404 https://winjay.cn; 
}







#=====================================
#
#
#server {
#    listen 80;
#    server_name temp.winjay.cn;
#
#    location / {
#       proxy_pass http://WinJay-Test;
#       proxy_set_header   HOST             $host;
#       proxy_set_header   X-Real-IP        $remote_addr;
#       proxy_set_header   X-Forwarded-Proto $scheme;
#       proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
##       Proxy Settings
#       proxy_redirect     off;
#       proxy_set_header   Connection       close;
#       proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
#       proxy_max_temp_file_size 0;
#       proxy_connect_timeout      90;
#       proxy_send_timeout         90;
#       proxy_read_timeout         90;
#       proxy_buffer_size          4k;
#       proxy_buffers              4 32k;
#       proxy_busy_buffers_size    64k;
#      }
#    error_page   500 502 503 504  /50x.html;
#    location = /50x.html {
#        root   /usr/share/nginx/html;
#    }
#}




0

评论区