Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔮 resolved #565
변경 사항
고민과 해결 과정
1️⃣ SSL 인증서 갱신
net::ERR_CERT_DATE_INVALID
에러를 해결하기 위해 SSL 인증서를 갱신했다. 기존에 작성한 docker-compose의 명령이 올바르지 않아 자동으로 갱신이 이루어지지 않았다.docker-compose의 커맨드를 수정하는 것도 하나의 방법이지만, 매번 강제로 갱신을 하게 되면 갱신 횟수를 초과할 수 있기 때문에 호스트 서버에 certbot을 설치하여 ssl 인증서를 발급 받았다.
sudo apt install certbot sudo certbot certonly \ --webroot --webroot-path=/var/www/certbot \ --email [email] \ --agree-tos \ --no-eff-email \ -d [domain]
위 명령을 실행하고 나면
/etc/letsencrypt
하위에keys
,live
등이 생긴다.options-ssl-nginx.conf
과ssl-dhparams.pem
도 생성하여 보안을 고려해줬다.이제 더 이상
net::ERR_CERT_DATE_INVALID
에러가 발생하지 않는다.2️⃣ crontab에 SSL 인증서 갱신 등록하기
0 2 1 * *
: 매월 1일 오전 2시에sudo certbot ~
: 인증서 갱신하기--non-interactive
로 사용자 입력 없이 실행하고,--force-renewal
을 통해 유효기간이 남아있더라도 무조건 갱신하도록 한다.(선택) 테스트 결과