https설정

yknam·2023년 12월 1일

설정방법

duckdns설정

imcmaster.duckdns.org로 설정

certbot

 sudo certbot certonly -a webroot -w /var/www/letsencrypt/ -d imcmaster.duckdns.org
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for imcmaster.duckdns.org

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/imcmaster.duckdns.org/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/imcmaster.duckdns.org/privkey.pem
This certificate expires on 2024-02-29.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

nginx 설정변경

80포트만 ssl이 가능하므로 나머지 포트는 아래와 같이 추가
/etc/nginx/sites-avaliable/default에 프록시설정 추가

    location /fetch {
        proxy_pass  http://winubuntu:7878;
    }       # pass PHP scripts to FastCGI server

cert 갱신주기 3개월 자동화

crontab -e
0 12 * * * /usr/bin/certbot renew --quiet
profile
50대 개발자 노드, 자바스크립트

0개의 댓글