Server

Ubuntu Apache 무료 SSL 인증서 발급

데브한 2021. 5. 25. 12:26

Ubuntu 서버에서 WebServer(Apache) 를 사용하는 경우 무료 SSL 인증서 (Let's Encrypt)를 발급받는 방법입니다.

Ubuntu 18.04, Ubuntu 20.04 기준입니다

 

Certbot을 설치해줍니다.

apt install software-properties-common
add-apt-repository universe
add-apt-repository ppa:certbot/certbot
apt update
apt upgrade
apt install certbot python3-certbot-apache

 

Certbot을 사용해서 인증서를 발급받을때 2가지 방법이 있습니다.

1. 인증서 발급과 설정파일을 같이 생성

2. 인증서만 발급

 

저는 2번의 방법으로 진행하였고 2번 방법에 대해서 설명하도록 하겠습니다.

 

mydomain.com 도메인의 인증서 발급

certbot certonly --apache -d mydomain.com 

 

SSL 인증서 발급 성공

인증서 발급에 성공하면 ssl 인증서 파일 경로와 만료 날짜가 뜨게 됩니다.

 

이제 Apache 설정파일에서 설정하도록 합니다!

Apache ssl 설정 conf

 

 

sudo systemctl reload apache2

아파치를 reload 해주시면 적용된걸 확인하실수 있습니다!