본문 바로가기
컴퓨터.IT/우분투(ubuntu)

우분투(Ubuntu) 18.04 LTS (update: 20.04 focal)에 Let’s Encrypt SSL 인증서 설치하기

by www.woobi.org 2019. 3. 21.

1. 설치

 

 1-1 Ubuntu 18.04 LTS


sudo add-apt-repository ppa:certbot/certbot


sudo apt update


sudo apt install python-certbot-apache


 1-2 Ubuntu 20.04 LTS(focal)

 


sudo snap install --classic certbot




Ubuntu 20.04 LTS 설치후 인증서 받기는 동일하게 진행한다,



2. 인증서 받기


sudo certbot --apache -d woobi.org -d www.woobi.org


   -d woobi.org -d www.woobi.org <==부분에 인증서를 받고자하는 사이트 주소를 적어준다.


    (글에서는 woobi.org 와 www.woobi.org 두 주소가 들어간 인증서를 신청함)


 

1: No redirect - Make no further changes to the webserver configuration.

2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for

new sites, or if you're confident your site works on HTTPS. You can undo this

change by editing your web server's configuration.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

 위와 같이 나오면 2을 입력한다.


 인증서 자장위치

/etc/letsencrypt/live/(자신의 도메인주소) 



위와같이 4개의 파일이 생성된것을 볼 수있다.


 


3. 자동 갱신


sudo certbot renew --dry-run


인증서가 90일 후면 만료되므로

 

주기적으로 입력하여 만료전에 갱신을 한다.

 


4. 인증서 테스트


https://www.ssllabs.com/ssltest/ 에서 자신의 도메인을 입력한다.

댓글