[ letsencrypt 설치 및 설정 ]
# git clone https://github.com/letsencrypt/letsencrypt
# cd letsencrypt
# ./letsencrypt-auto --help -> 다운받은 폴더로 이동 후 아래 명령을 실행하면 자동으로 관련 의존성을 다운받아서 설치 된다.
# ./letsencrypt-auto certonly -a webroot --agree-tos -m <이메일> -w <webrootpath> -d <SSL발급도메인명> --rsa-key-size 4096
ex) ./letsencrypt-auto certonly -a webroot --agree-tos -m les4707@naver.com -w /home/web/ -d leeeunseok.xyz --rsa-key-size 4096
주의) 발급을 원하는 도메인은 반드시 웹접속이 가능한 상태어어야 한다. ( 웹서버, DNS , 방화벽 확인 필요)
(주) 최초 발급 시도시 아래의 메세지가 표시되며, 이후 물어보지 않는다.
EFF의 Let’s Encrypt 관련 소식을 이메일로 받고 싶다면 “y”를 원하지 않는 다면, “n” 입력 한다.
-------------------------------------------------------------------------------
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o: n
기본 포트를 SSL으로 이용하는 경우
vi /usr/local/apache/conf/extra/httpd-ssl.conf
<VirtualHost *:443>
DocumentRoot 웹루트경로
ServerName 도메인명:443
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/도메인명/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/도메인명 /privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/도메인명/fullchain.pem
<VirtualHost>
이후 아파치 재시작
[root@techsmile-6580 letsencrypt]# /etc/init.d/apachectl stop
AH00526: Syntax error on line 51 of /usr/local/apache/conf/extra/httpd-ssl.conf:
Invalid command 'SSLCipherSuite', perhaps misspelled or defined by a module not included in the server configuration
아파치 재시작시 위와 같이 에러발생할경우 아래파일을 열고 주석해제
vi /usr/local/apache/conf/httpd.conf
LoadModule ssl_module modules/mod_ssl.so -> 해당부분 주석해제
[root@techsmile-6580 letsencrypt]# /etc/init.d/apachectl stop
AH00526: Syntax error on line 76 of /usr/local/apache/conf/extra/httpd-ssl.conf:
SSLSessionCache: 'shmcb' session cache not supported (known names: ). Maybe you need to load the appropriate socache module (mod_socache_shmcb?).
아파치 재시작시 위와 같이 에러발생할경우 아래파일을 열고 주석해제
vi /usr/local/apache/conf/httpd.conf
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so -> 해당부분 주석해제
letsencrypt는 3달에 한번씩 갱신해줘야하며, 아래 내용은 도메인 갱신하는 명령어입니다.
/letsencrypt-auto certonly -a webroot --agree-tos --renew-by-default -w <webrootpath> -d <ssl갱신도메인명> --rsa-key-size 4096
vi letscron.sh -> 스크립트 만들고 크론탭에 약2달에한번 실행되도록 등록할것
#!bin/sh
echo /letsencrypt-auto certonly -a webroot --agree-tos --renew-by-default -w /home/web/ -d leeeunseok.xyz --rsa-key-size 4096