server {
listen 443 default ssl;
server_name blog.hotcoding.top;
ssl_certificate cert/1756981_blog.hotcoding.top.pem;
ssl_certificate_key cert/1756981_blog.hotcoding.top.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
server_name_in_redirect off;
ssl on;
location / {
proxy_pass http://39.105.202.233:8000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
root html;
index index.html index.htm;
}
}
server {
listen 80;
server_name blog.hotcoding.top;
location / {
# Redirect other HTTP traffic to HTTPS
return 301 https://blog.hotcoding.top$request_uri;
}
}
近期评论