将 http
弄成 https
很简单,但是,之前在 wordpress
中一直不成功,但是,今天偶尔尝试成功了,所以,记录下来。
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| server { listen 80; server_name thlm.com lumi.thlm.com eternal.thlm.com test.thlm.com dgn.thlm.com; return 301 https://$host$request_uri; }
server { server_name thlm.com lumi.thlm.com eternal.thlm.com test.thlm.com dgn.thlm.com; listen 443 ssl; listen [::]:443 ssl;#新增这两个 ssl_certificate /home/ubuntu/ssl/fullchain.crt; ssl_certificate_key /home/ubuntu/ssl/private.pem; ... }
|
上面是有效的。