Notice
Recent Posts
Recent Comments
Link
250x250
«   2025/01   »
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 31
Tags more
Archives
Today
Total
관리 메뉴

혼자서 앱 만드는 개발자 함께하는 AI 세상

인증서 갱신 letsencrypt 3개월 이후 갱신 해야한다. 본문

nextjs 랭체인 챗봇만들기

인증서 갱신 letsencrypt 3개월 이후 갱신 해야한다.

혼앱사 2023. 10. 28. 18:18
반응형

우선 https  000-default.conf 을 수정 해준다.

root@skpark-ThinkPad-Edge-E430:/etc/apache2/sites-enabled# ls
000-default.conf
root@skpark-ThinkPad-Edge-E430:/etc/apache2/sites-enabled# 

iv 000-default.conf

<VirtualHost *:80>
        ServerName mybot1.store
        ServerAlias mybot1.store
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html
   #    ProxyPass / http://0.0.0.0:3001/
   #    ProxyPassReverse / http://0.0.0.0:3001/
        ErrorLog ${APACHE_LOG_DIR}/error.log
</VirtualHost>

두개를 막아줌 

root@skpark-ThinkPad-Edge-E430:/etc# cd letsencrypt/
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt# ls
accounts  archive  cli.ini  csr  keys  live  renewal  renewal-hooks
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt# cd live
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt/live# ls
README  mybot1.store
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt/live# mv mybot1.store mybot1.store1
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt/live# letsencrypt certonly --webroot --webroot-path=/var/www/html -d mybot1.store
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for mybot1.store

서비스 리스타트

# service apache2 restart


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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
 * Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
 * Donating to EFF:                    https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt/live# 
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt/live# 
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt/live# 
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt/live# ls
README  mybot1.store-0001  mybot1.store1
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt/live# mv mybot1.store-0001/ mybot1.store
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt/live# cd mybot1.store
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt/live/mybot1.store# ls
README  cert.pem  chain.pem  fullchain.pem  privkey.pem
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt/live/mybot1.store# cd ..
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt/live# ls
README  mybot1.store  mybot1.store1
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt/live# cd mybot1.store1
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt/live/mybot1.store1# ls
cert.pem  chain.pem  fullchain.pem  privkey.pem
root@skpark-ThinkPad-Edge-E430:/etc/letsencrypt/live/mybot1.store1# 

이젠 conf 파일 원상복구한후 리스타트 해준다.

root@skpark-ThinkPad-Edge-E430:/etc/apache2/sites-enabled# pwd
/etc/apache2/sites-enabled
root@skpark-ThinkPad-Edge-E430:/etc/apache2/sites-enabled# 

<VirtualHost *:80>
        ServerName mybot1.store
        ServerAlias mybot1.store
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html
        ProxyPass / http://0.0.0.0:3001/
        ProxyPassReverse / http://0.0.0.0:3001/
        ErrorLog ${APACHE_LOG_DIR}/error.log
</VirtualHost>
<VirtualHost *:443>

#service apache2 restart

 

 

 

728x90
반응형
Comments