728x90

무료 인증서 설치하는 방법을 적어둔다.


Redirecting vhost in /etc/httpd/conf.d/default.conf to ssl vhost in /etc/httpd/conf.d/default-le-ssl.conf

자동으로 default.conf 에 설정한 VirtualHost 정보를 읽어서 default-le-ssl.conf 에 추가를 해주더라.



# 저장소 추가
yum -y install epel-release

yum -y install certbot

# 설치 : 웹서버가 Apache 인 경우
yum -y install python2-certbot-apache mod_ssl


# 설치하면
cd /etc/letsencrypt
cd /etc/httpd/conf.d/
default-le-ssl.conf
파일이 자동 생성된다.


cd /var/log/letsencrypt
에 로그가 쌓인다.



인증서 발급
# 자동으로 Redirecting vhost in /etc/httpd/conf.d/default.conf to ssl vhost in /etc/httpd/conf.d/default-le-ssl.conf
# VirtualHost 정보를 읽어서 설정을 해주더라.

# vi /etc/httpd/conf.d/default.conf 에 먼저 Virtual Host를 추가 등록해줘야 한다.

# 추가하면 자동으로 /etc/httpd/conf.d/default-le-ssl.conf 에 자동으로 추가된다.


# IP 주소가 변경된 곳에서 설치를 했더니 인증서가 유효하지 않다고 나온다.


certbot --apache -d abc.com
certbot --apache -d food.abc.com


# 재시작
systemctl restart httpd

systemctl status httpd

# ssl.conf 편집
cd /etc/httpd/conf.d/
vi /etc/httpd/conf.d/ssl.conf


#인증서 갱신
certbot renew

# 현재설치된 certbot 확인
certbot certificates

crontab -e

## 두달에 한번씩 인증서가 갱신되도록 작업 추가
0 0 2 * * /bin/bash -l -c 'certbot renew --quiet'

### 인증서 해지(Revoking certificates)
certbot revoke --cert-path /etc/letsencrypt/archive/${YOUR_DOMAIN}/cert1.pem

블로그 이미지

Link2Me

,