Letsencrypt add domain to existing certificate
페이지 정보
작성자 sbLAB 댓글 0건 조회 383회 작성일 23-06-23 12:34본문
Letsencrypt add domain to existing certificate
※ 기존 생성 인증서에 새로운 도메인 추가하기
[조건]
nginx + certbot + python3-certbot-nginx
# certbot certificates <----- 저장된 인증서 도메인 목록 확인
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
Certificate Name: mysite.kr
Serial Number: 000fd481c02fda60000df79ca57cb1df000
Key Type: RSA
Domains: mysite.kr
Expiry Date: 2023-09-18 13:22:15+00:00 (VALID: 87 days)
Certificate Path: /etc/letsencrypt/live/mysite.kr/fullchain.pem
Private Key Path: /etc/letsencrypt/live/mysite.kr/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# /etc/nginx/nginx.conf <--- server_name mysite.kr www.mysite.kr; 확인
※ server_name *.mysite.kr; 와일드카드 문자 * 로 되어 있는 경우
python3-certbot-nginx 플러그인이 nginx.conf + ssl 구문 자동 적용 생성 실패(mysite.kr 도메인이 없으므로)
-------------------------------------
/usr/lib/python3/dist-packages/*** =>
Could not automatically find a matching server block for mysite.kr.
Set the `server_name` directive to use the Nginx installer.
The certificate was saved, but could not be installed (installer: nginx).
After fixing the error shown below, try installing it again by running:
# certbot install --cert-name mysite.kr <---- nginx.conf server_name 확인 후 재 시도
---------------------------------------
[/etc/nginx/nginx.conf]
server {
listen 80;
server_name mysite.kr www.mysite.kr;
root /var/www/html;
location / {
index index.html index.htm index.php;
}
}
예) 기존 mysite.kr 도메인 인증서에 www.mysite.kr 도메인 추가
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Renewing an existing certificate for mysite.kr and www.mysite.kr
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/mysite.kr/fullchain.pem
Key is saved at: /etc/letsencrypt/live/mysite.kr/privkey.pem
This certificate expires on 2023-09-21.
These files will be updated when the certificate renews.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# certbot certificates <----- 저장된 인증서 도메인 목록 확인
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
Certificate Name: mysite.kr
Serial Number: 1116e42860c8542280fc5453b93f0f42111
Key Type: RSA
Domains: mysite.kr www.mysite.kr
Expiry Date: 2023-09-21 02:03:46+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/mysite.kr/fullchain.pem
Private Key Path: /etc/letsencrypt/live/mysite.kr/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[결과]
아래 도메인으로 ssl 정상 접속 가능.
- 이전글[Linux] Chmod 755 23.07.04
- 다음글※[Ubuntu + Nginx1.24.0(hc) + php8.1-fpm + MariaDB] 종합(표준경로설치) 23.06.21
댓글목록
등록된 댓글이 없습니다.