server {
listen 10443 ssl;
server_name _;
charset utf-8;
client_max_body_size 50m;
ssl_certificate /usr/local/nginx/certs/lfdomain.crt;
ssl_certificate_key /usr/local/nginx/private/lfdomain.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://172.16.0.10:8080;
index index.html index.htm;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
error_page 497 https://$host:10443$uri;
}
nginx同一端口http跳转到https
最新推荐文章于 2024-05-24 22:01:18 发布