티스토리 뷰
무료 인증서 (SSL) 발급 서비스 (LetsEncrypt) 간단 셋팅하기
사이트
특징
자가 서명 인증서 (무료) 인증서 유효기간은 90일 (30일 미만 남았을때 부터 인증서 갱신 가능) *.domain 일괄 서브 도메인 등록 불가 (서브 도메인 하나씩 인증서 발급) certbot 이라는 스크립트 이용하여 인증서 자동 생성, 갱신 가능 |
테스트 환경
도메인 : test.kensei.co.kr Centos 7 64bit httpd, mod_ssl (RPM) |
EPEL 저장소 추가
yum install epel-release |
certbot 설치
yum install certbot |
웹서버가 Apache 인 경우
yum install python2-certbot-apache
|
웹서버가 nginx 인 경우
yum install python2-certbot-nginx |
[사전 작업 필요]
SSL 모듈 설치 필요 (mod_ssl) 1. 발급받을 도메인이 certbot을 실행하는 서버 아이피를 바라보고 있어야 함 2. SSL 설정이 되어 있어야 함 |
1번 예시) test.kensei.co.kr 이라는 도메인을 네임서버에서 certbot 을 설치한 웹 서버로 잡아준다.
|
2번 예시)
/etc/httpd/conf.d/ssl.conf (파일에 도메인 설정이 되어 있어야 함)
ServerName test.kensei.co.kr:443
|
위 2가지 작업이 미리 진행되어야 아래와 같이 에러 없이 잘 실행된다.
certbot 명령어 실행 (apache 에서 실행해보았다)
[root@iwinvhelper-8053 wordpress]# certbot --apache -m takakocap@naver.com -d test.kensei.co.kr -n --agree-tos ------------------------------------------------------------------------------- You should test your configuration at: IMPORTANT NOTES: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate |
/etc/httpd/conf.d/ssl.conf (아래 라인이 추가되었다)
SSLCertificateFile /etc/letsencrypt/live/test.kensei.co.kr/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/test.kensei.co.kr/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/test.kensei.co.kr/chain.pem ServerAlias test.kensei.co.kr |
nginx 에서도 아래와 같이 하면 ssl.conf 파일안에 자동으로 설정까지 끝난다.
[root@iwinvhelper-7795 etc]# certbot --nginx -m takakocap@naver.com -d cert.kensei.co.kr -n --agree-tos ------------------------------------------------------------------------------- You should test your configuration at: IMPORTANT NOTES: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate |
인증서 갱신 명령어 (crontab 에 추가해서 자동으로 돌려주면 된다)
certbot renew
|
아직 인증서 갱신 할때가 안되었나 보다
[root@iwinvhelper-8561 conf.d]# certbot renew Saving debug log to /var/log/letsencrypt/letsencrypt.log ------------------------------------------------------------------------------- Processing /etc/letsencrypt/renewal/wp.kensei.co.kr.conf ------------------------------------------------------------------------------- Cert not yet due for renewal ------------------------------------------------------------------------------- The following certs are not due for renewal yet: /etc/letsencrypt/live/wp.kensei.co.kr/fullchain.pem (skipped) No renewals were attempted. ------------------------------------------------------------------------------- |
참고 사이트
http://blog.naver.com/itperson/220853849351 https://i.k-june.com/wp/4087 |
'WEB' 카테고리의 다른 글
워드프레스 구버젼 (옜날 버전) 설치하기 (0) | 2017.09.29 |
---|---|
mod_rewrite 예제) (0) | 2017.09.13 |
워드프레스 이커머스 (Electronic Commerce) (0) | 2017.05.24 |
cookie 보안 취약점 (0) | 2017.03.16 |
HTTP 링크 가져오기 (0) | 2017.03.03 |
- Total
- Today
- Yesterday
- mariadb
- gitlab
- softether
- yum
- GeoIP
- glusterfs
- 베이어다이나믹
- iptables
- L2TP
- cURL
- centos8
- WAF
- 리눅스
- IPSEC
- ssh
- MySQL
- mod_security
- Apache
- HAProxy
- php
- SSL
- galera
- kvm
- 인증서
- OpenVPN
- ntp
- NGINX
- pptp
- centOS7
- virtualbox
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |