Use Certbot Let's Encrypt SSL Certificates Posted on 2018-03-15 使用Certbot 3个月免费SSL Certificates 12345678910111213141516171819202122232425262728293031323334353637383940414243server { listen 80; server_name egou.co.kr; return 301 https://$host$request_uri;}server { listen 443 ssl http2; server_name egou.co.kr; access_log /var/log/nginx/access.log vhost; client_max_body_size 0; ssl_certificate /etc/letsencrypt/live/egou.co.kr/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/egou.co.kr/privkey.pem; ssl_prefer_server_ciphers on; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-RC4-SHA:AES128-GCM-SHA256:HIGH:!RC4:!MD5:!aNULL:!EDH:!CAMELLIA; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; add_header Strict-Transport-Security max-age=15638400; # only used certbot root /var/www/egou.co.kr/; location /.well-known/acme-challenge/ { root /var/www/egou.co.kr/; } error_page 497 https://$host:$server_port$request_uri; location / { proxy_pass http://172.17.0.4; 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_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $http_host; proxy_read_timeout 90; proxy_redirect off; }} 更新 Certificates废弃 Certificates