nginx https跳转

server {
listen 80;
server_name shareproject.hydee.cn;
listen 443 ssl;
ssl_certificate _.hydee.cn_bundle.crt;
ssl_certificate_key _.hydee.cn.key;
#charset koi8-r;
location / {
if ( $scheme = http ){
rewrite ^/(.*)$ https://shareproject.hydee.cn/$1 redirect;
}
proxy_pass http://10.200.25.105:80;
# proxy_redirect default;
proxy_read_timeout 30s;
proxy_connect_timeout 30s;
# proxy_send_timeout 600;
include vhosts/ip.rule;
}

location /open {
default_type application/json;
alias /data/h5/open/;
index url.json;
}

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

nginx https跳转

上一篇:nextjs中的懒加载


下一篇:想看js某个原生函数的源码