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;
# }
#}
评论区