docker npm(nginx proxy manager) 수동으로 config 수정 하는 방법 있을까요?
안녕하세요. 하늘 입니다.
현재 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;
}
}
호스트에서
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 서브도메인 등록수가 많이 줄어듭니다
cmt alert