bblog
bblog copied to clipboard
HTTPS
https://certbot.eff.org/#ubuntuxenial-nginx
server {
listen 443 ssl;
server_name blog.lishengcn.cn;
root /home/ubuntu/blog;
ssl_certificate /etc/letsencrypt/live/lishengcn.cn/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/lishengcn.cn/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers AES256+EECDH:AES256+EDH:!aNULL;
location /api {
rewrite ^.+api/?(.*)$ /$1 break;
proxy_pass http://127.0.0.1:8080;
}
}
rewrite ^/(.*) https://$server_name$1 permanent;
letsencrypt certonly --standalone --email [email protected] -d b.c -d a.b.c
https://github.com/mholt/caddy