user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

events {
    worker_connections 1024;
}

http {
    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    server {
        listen 80;
        server_name jellyfin.hyungi.net;

        # Let's Encrypt 인증 경로
        location /.well-known/acme-challenge/ {
            root /var/www/certbot;
        }
        
        # 나머지는 젤리핀 앱으로 프록시
        location / {
            proxy_pass http://host.docker.internal:8096;
            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;
        }
    }
}




