homeserverwithdebian:certbotandapache2

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
homeserverwithdebian:certbotandapache2 [2024/04/03 13:46] – [3. Certbot 설정] baecyhomeserverwithdebian:certbotandapache2 [2024/08/05 09:32] (현재) – [3. Certbot 설정] baecy
줄 13: 줄 13:
 <VirtualHost *:443> <VirtualHost *:443>
  ServerName  gamu.kr     ## 추가  ServerName  gamu.kr     ## 추가
-        ServerAlias www.gamu.kr ## ServerAlias는 더 추가 가능 +    ServerAlias www.gamu.kr ## ServerAlias는 더 추가 가능
   
  ServerAdmin webmaster@localhost  ServerAdmin webmaster@localhost
줄 34: 줄 34:
 <codeprism lang=bash host=debian> <codeprism lang=bash host=debian>
 sudo a2ensite gamu.kr.conf sudo a2ensite gamu.kr.conf
-sudo systemctl restart apache2 +sudo systemctl restart apache2</codeprism>
-</codeprism>+
 \\ \\
 ==== 3. Certbot 설정 ==== ==== 3. Certbot 설정 ====
줄 42: 줄 41:
 sudo systemctl restart apache2 sudo systemctl restart apache2
 sudo systemctl status certbot.timer  ## 갱신 작동 확인</codeprism> sudo systemctl status certbot.timer  ## 갱신 작동 확인</codeprism>
 +
 +다음과 같은 메세지 출력시에는
 +<code bash cmdout>
 +Unable to find corresponding HTTP vhost; 
 +Unable to create one as intended addresses conflict; 
 +Current configuration does not support automated redirection
 +</code>
 +
 +이 방법으로 적용
 +<code bash>
 +certbot certonly --standalone -d gamu.kr,www.gamu.kr
 +</code>
 ==== 4. DDNS 자동 갱신 ==== ==== 4. DDNS 자동 갱신 ====
-/usr/lib/systemd/system/gamu.service +**/usr/lib/systemd/system/gamu.service** 작성 
-<codedoc code:systemd>+<codeprism lang=systemd>
 [Unit] [Unit]
 Description=gamu.kr & www.gamu.kr DDNS(DnsZi) Renewal Service Description=gamu.kr & www.gamu.kr DDNS(DnsZi) Renewal Service
줄 50: 줄 61:
 [Service] [Service]
 Type=oneshot Type=oneshot
-ExecStart=/usr/local/bin/wget -q -O - 'http://ddns.dnszi.com/set.html?user=<ddnzi-id>&auth=<dnszi-auth-key>&domain=gamu.kr&record=' +## DNSZi 사이트에서 코드 발행후 입력 
-</codedoc>+ExecStart=$(type -p wget-q -O - 'http://ddns.dnszi.com/set.html?user=<ddnzi-id>&auth=<dnszi-auth-key>&domain=gamu.kr&record='</codeprism>
  
-/usr/lib/systemd/system/gamu.timer +**/usr/lib/systemd/system/gamu.timer** 작성 
-<codedoc code:systemd>+<codeprism lang=systemd>
 [Unit] [Unit]
 Description=Run DDNS(https://dnszi.com) Service Renewal twice daily Description=Run DDNS(https://dnszi.com) Service Renewal twice daily
줄 65: 줄 76:
 [Install] [Install]
 WantedBy=timers.target WantedBy=timers.target
-</codedoc>+</codeprism>
  
 systemd 등록, 실행 systemd 등록, 실행
-<codedoc code:bash>+<codeprism cmd=true lang=bash>
 sudo systemctl enable gamu.timer  # 부팅시 타이머 실행 설정 sudo systemctl enable gamu.timer  # 부팅시 타이머 실행 설정
 sudo systemctl start gamu.timer   # 타이머 실행 sudo systemctl start gamu.timer   # 타이머 실행
-sudo systemctl status gamu.kr     # 등록한 타이머 상태 확인 +sudo systemctl status gamu     # 등록한 타이머 상태 확인</codeprism> 
-</codedoc>+\\
  • homeserverwithdebian/certbotandapache2.1712151990.txt.gz
  • 마지막으로 수정됨: 2024/04/03 13:46
  • 저자 baecy