11.Nas_1




● 시놀로지작업_성공2_삽질기) 무료ssl 인증서 자동생성/관리자 Nginx Proxy Manager 시놀로지 도커에 설치 작업

♨ 카랜더 일정 :
  • 링크

  • 첨부

  • 컨텐츠 정보

    본문

    ● 시놀로지작업_성공2_삽질기) 무료ssl 인증서 자동생성/관리자  Nginx Proxy Manager 시놀로지 도커에 설치 작업
    정리된 작업은 

    ★★★ 시놀로지작업_재설치 검증성공 ) 무료ssl 인증서 자동생성 Nginx Proxy Manager 시놀로지 도커에 설치 작업 2nd ssl인증서 적용

    https://11q.kr/www/bbs/board.php?bo_table=s11&wr_id=12471



    =========== 테스트 내용입니다 ======

    ● HA작업_시놀로지작업) HAOS 의 NPM으로 서브 인증서 생성 시놀로지 2개의 서브도메인 https:// 적용하기 (주의요함 제거 하기)

    https://11q.kr/www/bbs/board.php?bo_table=co3&wr_id=779

    성공하여 시놀로지 서버로 생성 준비


    시놀로지 도커에서 추가 사용 하자

    mkdir -p /volume1/docker/npm/data
    mkdir -p /volume1/docker/npm/letsencrypt
    chmod 760 -R /volume1/docker/config
        
    ## first setting
    81 포트로  실행 합니다
    #Email:    admin@example.com
    #Password: changeme
    ====================


    ===============
    참조 사이트
    https://svrforum.com/board/754162
    https://nginxproxymanager.com/setup/#running-the-app
    https://siane.tistory.com/351
    https://www.clien.net/service/board/cm_nas/16504152
    https://github.com/jlesage/docker-nginx-proxy-manager#synology
    ================  참조 사이트 중에 ==============
    https://siane.tistory.com/351

    참조하여  시놀로지  dsm 7.1  docker 이미지 다운로드 에서  성공  참조 합니다.

     jlesage/nginx-proxy-manager

    이미지 검색 다운로드 설치  

    3232235521_1682587186.543.png

    1)  변경 포인트 : 포트 >> 아래대로 

    3232235521_1682588893.2084.png

    2)  변경 포인트 : 볼륨 추가

    3232235521_1682590552.9502.png

    3) 나머지는 자동으로 수정없이  구성

    정상적으로 8181포트 연결

    설정후 동작 상태

    3232235521_1682588824.6296.png

    3232235521_1682588807.1899.png
    http://192.168.0.7:8181/
    접속 성공
    Email:    admin@example.com
    Password: changeme
    초기 아이디및 암호  설정
    3232235521_1682589035.8243.png

    공유기
    3232235521_1682589338.6938.png


    haos에서 설정값  
    참조 설정 내용 입니다.

    먼저 ssl 인증서 생성
    3232235521_1682609638.9619.png


    https://cafe.naver.com/koreassistant/10310

    3232235521_1682609792.4255.png

    https://www.duckdns.org

    로그인후 토큰 복사 합니다

    토큰

    5cbc776d-35db-4f4f-b4d9-eb47be3316e1


    DuckDNS 로 선택하면, dns_duckdns_token=your-duckdns-token 이라는 문구가 보일겁니다.

    여기에서 your-duckdns-token  부분을 ->> duckdns.org 사이트에서 확인한 token 값으로 넣어주시면 됩니다.

    3232235521_1682609896.4544.png

    3232235521_1682609492.5672.png

    3232235521_1682609558.0879.png

    ================ 작업 ================

    변경

    TZ = Asia/Seoul

    삭제

    SUP_GROUP_IDS

    INSTALL_PACKAGES

    ==================

    https://svrforum.com/svr/373710

    3232235521_1682695314.5397.png

    3232235521_1682695425.1033.png

    실패

    3232235521_1682695644.8.png

    3232235521_1682661441.0654.png

    Error: Command failed: certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-1" --agree-tos --email "ss1145@kakao.com" --domains "*.11q.duckdns.org,11q.duckdns.org" --authenticator dns-duckdns --dns-duckdns-credentials "/etc/letsencrypt/credentials/credentials-1"
    Saving debug log to /var/log/letsencrypt/letsencrypt.log
    Some challenges have failed.
    Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
    
        at ChildProcess.exithandler (node:child_process:402:12)
        at ChildProcess.emit (node:events:513:28)
        at maybeClose (node:internal/child_process:1100:16)
        at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

    상기는 실패 시놀로지도커에서 안된다

    포트

    다시도커 파일 삭제 후 진행

    파일관리자로 폴더 삭제

    jc21 nginx-proxy-manager  파일로  재설치 진행 

    https://svrforum.com/nas/321989

    의 방식으로 진행 합니다

    이미지 다운로드받기.

    docker 패키지를 실행시킨 뒤 이미지 -> 추가 -> URL에서 추가 
    https://hub.docker.com/r/jc21/nginx-proxy-manager 

    3232235521_1682731252.2833.png


    3232235521_1682731339.5238.png

    또는


    jc21 nginx-proxy-manager  검색 다운로드합니다

    저는 검색 다운로드 진행

    3232235521_1682731573.7721.png


    다운로드 완료한 이미지로  실행

    3232235521_1682731644.7822.png


    설정 > bridge

    3232235521_1682731853.9598.png


    컨테이너 이름주고> 자동 재시작

    3232235521_1682731929.8036.png

    포트를 주고


    3232235521_1682732063.5033.png

    공유기포트 확인

    3232235521_1682732112.4927.png


    letsencrypt

    data

    config

    3232235521_1682732266.9887.png

    3232235521_1682732303.5279.png


    파일 스테이션에서 생성

    3232235521_1682732382.4533.png


    3232235521_1682732410.7598.png

    폴더 연결후 다음으로 진행

    3232235521_1682732523.3365.png

    3232235521_1682732589.6803.png

    http://192.168.0.7:81/login

    http://192.168.0.7:8181/
    접속 성공
    Email:    admin@example.com
    Password: changeme

    3232235521_1682732843.0248.png


    사용자 등록및 암호 등

    3232235521_1682732858.4507.png

    3232235521_1682732935.5766.png

    DNS Test

    3232235521_1682733238.5925.png


    3232235521_1682733310.3643.png

    3232235521_1682733195.2284.png

    Communication with the API failed, is NPM running correctly?

    https://www.reddit.com/r/nginxproxymanager/comments/104q0bw/communication_with_the_api_failed_internal_error/

    NPM을 설정할 때 다소 비슷한 문제가 있었습니다.
    호스트에 포트 80 및 443을 포트 포워딩했는지 확인하고
    DNS가 올바르게 설정되었는지 확인하세요. 
    전문가는 아니지만 조금이나마 도움이 되었으면 합니다

    3232235521_1682734035.5785.png



    3232235521_1682734231.3322.png

    설정 변경 해보자 ( 포트설정 과 공유기 포워드 설정)

    3232235521_1682734370.0645.png

    3232235521_1682661441.0654.png

    Error: Command failed: certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-1" --agree-tos --email "ss1145@kakao.com" --domains "*.11q.duckdns.org,11q.duckdns.org" --authenticator dns-duckdns --dns-duckdns-credentials "/etc/letsencrypt/credentials/credentials-1"
    Saving debug log to /var/log/letsencrypt/letsencrypt.log
    Some challenges have failed.
    Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

        at ChildProcess.exithandler (node:child_process:402:12)
        at ChildProcess.emit (node:events:513:28)
        at maybeClose (node:internal/child_process:1100:16)
        at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

    문제 발생--------------------------중지

    ===============

    https://svrforum.com/docker/730947

    정보 확인

    docker exec -it NPM_jc21-nginx-proxy-manager1  bash

    들어가서

     python3 -m pip install certbot_dns_duckdns

    명령어 주고 

    3232235521_1682818921.0617.png

    3232235521_1682819371.0518.png

    Error: Command failed: certbot certonly --config "
    Error: Command failed: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-3" --agree-tos --email "ss1145@kakao.com" --domains "*.11q.duckdns.org,11q.duckdns.org" --authenticator dns-duckdns --dns-duckdns-credentials "/etc/letsencrypt/credentials/credentials-3"
    Saving debug log to /tmp/letsencrypt-log/letsencrypt.log
    Error parsing credentials configuration '/etc/letsencrypt/credentials/credentials-3': Invalid line ('5cbc776d-35db-4f4f-b4d9-eb47be3316e1') (matched as neither section nor keyword) at line 2.
    Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/letsencrypt-log/letsencrypt.log or re-run Certbot with -v for more details.

        at ChildProcess.exithandler (node:child_process:402:12)
        at ChildProcess.emit (node:events:513:28)
        at maybeClose (node:internal/child_process:1100:16)
        at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)


    [root@docker-NPM_jc21-nginx-proxy-manager1:/app]# cat /etc/letsencrypt.ini

    text = True

    non-interactive = True

    webroot-path = /data/letsencrypt-acme-challenge

    key-type = ecdsa

    elliptic-curve = secp384r1

    preferred-chain = ISRG Root X1

    [root@docker-NPM_jc21-nginx-proxy-manager1:/app]# ls /tmp/letsencrypt-lib

    -------

    [root@docker-NPM_jc21-nginx-proxy-manager1:/app]# cat  /tmp/letsencrypt-log/letsencrypt.log

    2023-04-30 01:52:07,605:DEBUG:certbot._internal.main:certbot version: 2.5.0

    2023-04-30 01:52:07,606:DEBUG:certbot._internal.main:Location of certbot entry point: /usr/local/bin/certbot

    2023-04-30 01:52:07,606:DEBUG:certbot._internal.main:Arguments: ['--non-interactive', '--quiet', '--config', '/etc/letsencrypt.ini', '--work-dir', '/tmp/letsencrypt-lib', '--logs-dir', '/tmp/letsencrypt-log', '--preferred-challenges', 'dns,http', '--disable-hook-validation']

    2023-04-30 01:52:07,606:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#dns-duckdns,PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)

    2023-04-30 01:52:07,629:DEBUG:certbot._internal.log:Root logging level set at 40

    2023-04-30 01:52:07,631:DEBUG:certbot._internal.display.obj:Notifying user:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    2023-04-30 01:52:07,638:DEBUG:certbot._internal.display.obj:Notifying user: No renewals were attempted.

    2023-04-30 01:52:07,638:DEBUG:certbot._internal.display.obj:Notifying user: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    2023-04-30 01:52:07,638:DEBUG:certbot._internal.renewal:no renewal failures

    [root@docker-NPM_jc21-nginx-proxy-manager1:/app]#



    3232235521_1682820436.6004.png


    시놀로지의 경우 443 포트를 dsm에서 점유하고있기때문에 타 포트를 적어주시고 포트포워딩을 해당포트로해주시면됩니다.

    ex) 8080:80, 8443:443으로 매핑하고 포트포워딩시 공유기의 80을 8080으로 443은 8443으로요

    3232235521_1682820974.9919.png

    netstat -pant | grep -E ':80|:443'

    3232235521_1682820935.2706.png

    포트인식 확인

    3232235521_1682820882.6294.png


    동작을 재현 하는 단계:

    "SSL 인증서" 탭으로 이동합니다.

    "SSL 인증서 추가"를 클릭합니다.

    "*.11q.duckdns.org, 11q.duckdns.org" 도메인을 입력합니다.

    "DNS 챌린지 사용",

    duckdns를 선택하고 API 키를 설정합니다.



    *.11q.duckdns.org

    11q.duckdns.org

    5cbc776d-35db-4f4f-b4d9-eb47be3316e1


    Error: Command failed: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-4" --agree-tos --email "ss1145@kakao.com" --domains "*.11q.duckdns.org,11q.duckdns.org" --authenticator dns-duckdns --dns-duckdns-credentials "/etc/letsencrypt/credentials/credentials-4"
    Saving debug log to /tmp/letsencrypt-log/letsencrypt.log
    Some challenges have failed.
    Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/letsencrypt-log/letsencrypt.log or re-run Certbot with -v for more details.
    
        at ChildProcess.exithandler (node:child_process:402:12)
        at ChildProcess.emit (node:events:513:28)
        at maybeClose (node:internal/child_process:1100:16)
        at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)


    Error: Command failed: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-4" --agree-tos --email "ss1145@kakao.com" --domains "*.11q.duckdns.org,11q.duckdns.org" --authenticator dns-duckdns --dns-duckdns-credentials "/etc/letsencrypt/credentials/credentials-4"

    Saving debug log to /tmp/letsencrypt-log/letsencrypt.log

    Some challenges have failed.

    Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/letsencrypt-log/letsencrypt.log or re-run Certbot with -v for more details.


        at ChildProcess.exithandler (node:child_process:402:12)

        at ChildProcess.emit (node:events:513:28)

        at maybeClose (node:internal/child_process:1100:16)

        at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

    ================


    shimss@www11qkr:~$ docker exec -it NPM_jc21-nginx-proxy-manager1  bash
     _   _       _            ____                      __  __
    | \ | | __ _(_)_ __ __  _|  _ \ _ __ _____  ___   _|  \/  | __ _ _ __   __ _  __ _  ___ _ __
    |  \| |/ _` | | '_ \\ \/ / |_) | '__/ _ \ \/ / | | | |\/| |/ _` | '_ \ / _` |/ _` |/ _ \ '__|,,,중략
    .,,,
      File "/usr/local/lib/python3.7/dist-packages/certbot/_internal/auth_handler.py", line 212, in _poll_authorizations
        raise errors.AuthorizationError('Some challenges have failed.')
    certbot.errors.AuthorizationError: Some challenges have failed.
    2023-04-30 02:26:57,799:ERROR:certbot._internal.log:Some challenges have failed.
    [root@docker-NPM_jc21-nginx-proxy-manager1:/app]#


    다시 입력 저장 실행후 다시 에러

    3232235521_1682661441.0654.png

    상태에서 공유기 를  80과 443를 추가 변경으로 

    3232235521_1682822667.292.png

    3232235521_1682661441.0654.png

    이상태에서 저장 하니  정상적으로 발행/생성  되었습니다

    3232235521_1682822829.7379.png

    [ 에러 발생 대응 주요 요약]

    docker exec -it NPM_jc21-nginx-proxy-manager1  bash

    들어가서
    조치1)

     python3 -m pip install certbot_dns_duckdns

    에러 발생 

    3232235521_1682661441.0654.png

    이에러 상태에서

    구글링 정보에 의하면

    시놀로지의 경우 443 포트를 dsm에서 점유하고있기때문에 타 포트를 적어주시고 포트포워딩을 해당포트로해주시면됩니다.

    ex) 8080:80, 8443:443으로 매핑하고 포트포워딩시 공유기의 80을 8080으로 443은 8443으로요

    상기 상태는  docker의 포트 설정 상태 현제 입니다

    3232235521_1682820974.9919.png


    포트 상기 상태에서 변경하지 않고

    에러 상태에서  아래 변경 

    조치2) 

    상태에서 공유기만   80과 443를 추가 변경으로 ( 시놀로지 웹서버와 포트 80,443  겹치는 부분임) 

    3232235521_1682823648.5832.png


    3232235521_1682823382.0368.png

    다시 저장후 생성 성공 했습니다




    ☞ https://11q.kr 에 등록된 자료 입니다. ♠ 정보찾아 공유 드리며 출처는 링크 참조 바랍니다♠1.png
    [이 게시물은 11qkr님에 의해 2023-04-30 16:02:32 코딩정보에서 이동 됨]
    [ 추가 정보 ... 더보기) ]
    뷰PDF 1,2



    office view

    관련자료

    댓글목록

    profile_image

    11qkr님의 댓글

    11qkr 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 아이피 (192.♡.0.1) 작성일

    npm 업데이트 후
    SUP_GROUP_IDS
    등 공란 삭제후  dsm 재시작으로해결




    • 일간 조회수
        • 게시물이 없습니다.
    • 주간 조회수
        • 게시물이 없습니다.
    • 월간 조회수
        • 게시물이 없습니다.


    Total 1,746 / 1 Page
    [ ● syncthing 으로 사진관리 자동백업 설정 재설정 재연결 작업 synology NAS간편 스마트폰 사… ]

    ● syncthing 으로 사진관리 자동백업 설정 재설정 재연결 작업 synology NAS간편 스마트폰 사진 백업- 가장빨리 백업및 pc에서 …

    [ ● dsm 7.2.1 update 해결)시놀로지 업데이트를 위한 시스템 용량이 부족합니다. 이 문서를 참조하… ] 댓글 4

    ● 해결)시놀로지업데이트를 위한 시스템 용량이 부족합니다. 이 문서를 참조하여 문제를 해결하십시오.Synology는 시스템 성능과 안정성이 향상…

    [ ● 작업) ESXi VM 이미지 백업 내보내기 작업) 호스트 또는 vSphere 클라이언트에서 VM을 내보… ]

    ● 작업) ESXi VM 이미지 백업 내보내기 작업) 호스트 또는 vSphere 클라이언트에서 VM을 내보내고 가져오는 간단한 방법은 무엇입니까…

    [ ● 시놀로지 네트워크 인터페이스 변경 속도가 높은 LAN 포트로 변경 합니다. ]

    ● 시놀로지 네트워크 인터페이스 변경속도가 높은 LAN 포트로 변경 합니다. 요즘 헤놀로지ARPL(Automated Redpill Loader)…

    [ ● Esxi 서버 vm 백업 툴 개방형 가상화 형식 도구(ovftool) 다운로드하여백업(Backup)하고… ] 댓글 1

    ● Esxi 서버 vm 백업 툴개방형 가상화 형식 도구(ovftool) 다운로드하여백업(Backup)하고 복원(Restore)하기방법1) esx…

    [ ● 시놀로지작업_성공2_삽질기) 무료ssl 인증서 자동생성/관리자 Nginx Proxy Manager 시놀… ] 댓글 1

    ● 시놀로지작업_성공2_삽질기) 무료ssl 인증서 자동생성/관리자 Nginx Proxy Manager 시놀로지 도커에 설치 작업정리된 작업은★★…

    [ ● 시놀로지작업) NPM 을 이용한 서브도메인 sub.aaa.duckdns.org를 이용한 시놀로지 역방향… ]

    ● 시놀로지작업) NPM 을 이용한 서브도메인 sub.aaa.duckdns.org를 이용한 시놀로지 역방향 프록시 적용 https;// 서브 도…

    [ ● 시놀로지작성) 도커 컨테이너 만들기에서 Web Station을 통해 웹 포털 활성화 ]

    ● 시놀로지작성) 도커컨테이너 만들기에서Web Station을 통해 웹 포털 활성화더이상 사용할 수 있는 노출된 포트가 없습니다. 노출된 포트…


    ♥간단_메모글♥


    최근글


    새댓글



    PHP 안에 HTML ☞ 홈페이지 화면갱신 시간은 ♨
    ▶ 2024-04-17 03:36:14

    오늘의 홈 현황


    • 현재 접속자♨ 148 명
    • 오늘 가입자※ 0 명
    • 어제 가입자※ 4 명
    • 주간 가입자※ 15 명
    • 오늘 방문자 671 명
    • 어제 방문자 1,817 명
    • 최대 방문자 13,042 명
    • 전체 방문자 4,273,433 명
    • 전체 게시물※ 8,514 개
    • 전체 댓글수※ 24,471 개
    • 전체 회원수 10,903 명

    QR코드


    ☞ 사진기로 촬영하시면 방문링크 됩니다

    알림 0








    최신글↑