问题描述:本人第一次使用 Nginx,为自己的博客系统增加 ssl,自己尝试之后出现无法显示所有信息的情况,而且点击链接后依旧跳转到 http 而不是 https,设置后有问题的链接是 https://www.tuhaoxin.cn
以下是我使用的环境:
操作系统:Ubuntu 18.04
Nginx 版本:1.14
博客系统: solo v3.2.0
nginx 配置如下( /etc/nginx/site-availble/default)
server { listen 443; server_name www.tuhaoxin.cn; ssl on; root html; index index.html index.htm; ssl_certificate /home/tuhaoxin/gitee/blog/certification/1852462_www.tuhaoxin.cn.pem; ssl_certificate_key /home/tuhaoxin/gitee/blog/certification/1852462_www.tuhaoxin.cn.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; location / { root html; index index.html index.htm; proxy_pass http://www.tuhaoxin.cn:8080/; } } server { listen 80; server_name www.tuhaoxin.cn; rewrite ^/(.*)$ https://www.tuhaoxin.cn/$1 permanent; }
尝试过的方法:
1 修改 solo 配置文件 latke.properties 中的 serverScheme=https,无效
对此问题,各位熟悉 Nginx 的朋友有什么建议吗?谢谢~