参考
https://www.cnblogs.com/mufengforward/p/9134840.html
主要是nginx的配置 以下是简单的配置 带https
server
{
listen 80;
listen 443 ssl http2;
server_name xxx.cn;
#SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
#error_page 404/404.html;
ssl_certificate /www/server/panel/vhost/cert/xxx.cn/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/xxx.cn/privkey.pem;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
add_header Strict-Transport-Security "max-age=31536000";
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8080;#jar包的端口号
}
}
版权声明:本文为csdnkalunren原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。