SW/ 개발팁 / 추천프로그램, 꿀팁 공유
  • 돌아가기
  • 아래로
  • 위로
  • 목록
  • 댓글
질문

docker npm(nginx proxy manager) 수동으로 config 수정 하는 방법 있을까요?

하늘위의하늘 하늘위의하늘 96

0

4

안녕하세요. 하늘 입니다.

현재 npm을 docker로 설치해서 사용중인데요.. 

기본 기능은 잘되는데요..

수동으로 추가 하고 싶은 기능(?) 명령어들이 있는데요.

 

아래 같은 넣고 싶은데요..  

어떻게 수정 할 수 있을까요? 아시는분 계신가요?

감사합니다.

 

 

UI 상에서 넣을 수 있는 값 (OK)

# Gzip compression
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
gzip_proxied any;
gzip_comp_level 5;

location / {
    proxy_pass http://192.168.1.35:9998;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

    # Disable caching
    add_header Cache-Control "no-store";

    # Proxy buffer settings
    proxy_buffering off;

    # Keep alive settings
    proxy_http_version 1.1;
    proxy_set_header Connection "";
}

 

수동으로 넣어야 하는 부분 (어떻게 넣나요?)

worker_processes auto;
events {
    worker_connections 1024;
}

http {
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    include /etc/nginx/mime.types;
    default_type application/octet-stream;
}

  

 

합쳐져 있는 참고 버전...

 

http {
    # Gzip compression
    gzip on;
    gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
    gzip_proxied any;
    gzip_comp_level 5;

    server {
        listen 443 ssl http2;
        server_name doc.magic-item.duckdns.org;

        # SSL certificate and key
        ssl_certificate /path/to/ssl_certificate.crt;
        ssl_certificate_key /path/to/ssl_certificate.key;

        location / {
            proxy_pass http://192.168.1.35:9998;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;

            # Disable caching
            add_header Cache-Control "no-store";

            # Proxy buffer settings
            proxy_buffering off;

            # Keep alive settings
            proxy_http_version 1.1;
            proxy_set_header Connection "";
        }

        # Logging
        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;
    }

    # General optimization
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    worker_processes auto;
    events {
        worker_connections 1024;
    }
}

 

 

신고공유스크랩
4

하늘위의하늘 하늘위의하늘
136Lv. 372226P
다음 레벨까지 3154P

*메인서버 - i5 8600k DDR4 128G - 디파인 XL R2 - NIC10G / ESXi 7.0 u2 / Ubuntu / Xpenology / WINDOWS / 각종 DB 서버 / API 서버 / 기타 형상관리 / NGINX / 기타 VM 등등

 

*백업서버 - J5005 DDR4 8G - 타오나스 B형 / DS918+ 6.2.3 RAID5+(1EA) / 메인서버 VM 스캐줄 백업용 

 

*추가 백업서버 - G5420 DDR4 16G 케이스 - NCORE미들타워 - NIC 10G / 

하드 10T WD-E + 12T WD-E + 14T WD RED / DAS 느낌의 내부용 NAS

 

profile image 2등
행복구슬 2024.05.15. 10:04

호스트에서
nano /etc/nginx/id.conf

proxy_max_temp_file_size 0;
client_max_body_size 0;
proxy_read_timeout 1800;
proxy_connect_timeout 1800;
proxy_send_timeout 1800;
proxy_request_buffering off;

또는 npm ui 어드밴스 에서 헤놀 webdav 등등 설정하시면됩니다

npm+tailscale 조합으로 사용하면 서브도메인이 관리가 아주 편해지고 npm 서브도메인 등록수가 많이 줄어듭니다

profile image
하늘위의하늘 글쓴이 2024.05.15. 22:41
행복구슬
오 추가할 수 있는 방법들이 있나보네요.... 알려주신 정보 바탕으로 좀더 찾아 보겠습니다. 감사합니다.

댓글 쓰기 권한이 없습니다. 로그인

취소 댓글 등록

cmt alert

신고

"님의 댓글"

이 댓글을 신고하시겠습니까?

댓글 삭제

"님의 댓글"

삭제하시겠습니까?


목록

공유

facebooktwitterpinterestbandkakao story
쓰기
태그 : Docker
분류 제목 글쓴이 날짜 조회 추천
정보 구글크롬 확장프로그램 오프라인 다운로드 및 설치방법 1 달소 3일 전11:13 123 +1
Linux Vmware -> Proxmox로 마이그레이션한 과정을 노션으로 정리해봤습니다. 3 Andrew 5일 전11:40 316 +3
잡담 뭐 찾아볼때 copilot 좋네요 2 bigworker128 24.05.19.22:16 388 +1
질문
image
도커가어렵 2일 전15:02 191 0
질문
normal
arkx 24.05.26.03:09 217 0
질문
normal
진짜루 24.05.25.20:48 568 0
질문
normal
Day 24.05.23.04:47 215 0
질문
normal
하늘위의하늘 24.05.15.04:25 96 0
질문
image
kmw_ 24.05.07.14:47 99 0
질문
image
정전리 24.05.03.23:31 113 0
질문
image
하인츠 24.05.03.22:12 60 0
질문
normal
zepinos 24.05.03.18:06 146 0
질문
normal
Nori 24.04.25.09:50 140 0
질문
image
very 24.04.21.10:19 270 0
질문
normal
zepinos 24.04.19.10:16 350 0
질문
normal
very 24.04.16.17:58 133 0
질문
normal
누룽지백숙 24.03.27.13:28 123 0
질문
image
누룽지백숙 24.03.23.11:33 300 0
질문
normal
very 24.03.22.08:01 297 0
질문
normal
very 24.03.21.16:55 355 0
질문
image
이치로운 24.03.01.16:20 121 0