반응형
출처 - http://doogle.blog.me/220963405181
Let's Encrypt 무료 SSL 인증서
wget https://dl.eff.org/certbot-auto chmod a+x certbot-auto
./certbot-auto
./certbot-auto certonly
./certbot-auto certonly --webroot -w /var/www/example -d example.com -d www.example.com -w /var/www/thing -d thing.is -d m.thing.is
root@doogle:/etc/letsencrypt/live/www.server.com# ll 합계 12 drwxr-xr-x 2 root root 4096 3월 20 15:04 ./ drwx------ 3 root root 4096 3월 20 15:21 ../ -rw-r--r-- 1 root root 543 3월 20 13:52 README lrwxrwxrwx 1 root root 44 3월 20 15:04 cert.pem -> ../../archive/www.server.com/cert2.pem lrwxrwxrwx 1 root root 45 3월 20 15:04 chain.pem -> ../../archive/www.server.com/chain2.pem lrwxrwxrwx 1 root root 49 3월 20 15:04 fullchain.pem -> ../../archive/www.server.com/fullchain2.pem lrwxrwxrwx 1 root root 47 3월 20 15:04 privkey.pem -> ../../archive/www.server.com/privkey2.pem
cd /etc/ssl/private openssl dhparam -out www.server.com.dhparam.pem 2048
server { listen 443; server_name www.server.com; root /웹서버/도큐먼트루트경로; ssl on; ssl_certificate "/etc/letsencrypt/live/www.server.com/fullchain.pem"; ssl_certificate_key "/etc/letsencrypt/live/www.server.com/privkey.pem"; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA"; ssl_prefer_server_ciphers on; # DH Param은 일부 암호화 알고리듬에 사용되는 커다란 난수 하나를 미리 생성해 두어서 암호화 성능을 향상시키고 보안을 높이는 방법입니다. ssl_dhparam "/etc/ssl/private/www.server.com.dhparam.pem"; ssl_stapling on; ssl_stapling_verify on; ssl_trusted_certificate "/etc/letsencrypt/live/www.server.com/fullchain.pem"; resolver 8.8.8.8 8.8.4.4; # Enable HSTS. This forces SSL on clients that respect it, most modern browsers. The includeSubDomains flag is optional. #add_header Strict-Transport-Security "max-age=31536000"; # HSTS turn on #add_header Strict-Transport-Security "max-age=0"; # HSTS turn off #기타설정들 중략... .... }
./path/to/certbot-auto renew --quiet
반응형
'개발 > 리눅스' 카테고리의 다른 글
[우분투]ssh 포트 변경하기 (0) | 2020.01.31 |
---|---|
[우분투] 각종 로그 기록 확인 (0) | 2020.01.31 |
우분투 jdk(자바) 설치 (0) | 2017.03.03 |
우분투에 nginx 설치 (0) | 2017.03.03 |
우분투에 vim 설치 (0) | 2017.03.03 |
댓글