# apt update // 패키지 목록 업데이트

 

# apt install certbot python3-certbot-apache2 // 패키지 설치

 

# certbot renew --dry-run // 인증서 발급 테스트

 

# certbot --apache // 인증서 발급

이후 설정에 따라 y or n

 

# vi /etc/apache2/sites-available/default-ssl.conf // apache2 ssl 적용

 

<VirtualHost *:443>

    ServerAdmin example@email.com
    ServerName example.com

    DocumentRoot /var/www/html

    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/[발급 단계에서 설정한 도메인 이름 ]/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/[발급 단계에서 설정한 도메인 이름]/privkey.pem

    ...

 

# systemctl restart apache2 // apache2 서비스 재시작

+ Recent posts