Created
January 2, 2026 08:10
-
-
Save bajpangosh/a85ae3e05160fad1ae2087e418d67c70 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| server_name de.bevq.in; | |
| access_log /var/log/nginx/jellyfin.access; | |
| error_log /var/log/nginx/jellyfin.error; | |
| # ========================= | |
| # Main Jellyfin Proxy | |
| # ========================= | |
| location / { | |
| proxy_pass http://127.0.0.1:8096; | |
| proxy_http_version 1.1; | |
| 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; | |
| proxy_set_header Connection ""; | |
| # Jellyfin streaming optimizations | |
| proxy_buffering off; | |
| proxy_request_buffering off; | |
| proxy_read_timeout 3600s; | |
| proxy_send_timeout 3600s; | |
| sendfile on; | |
| tcp_nopush on; | |
| tcp_nodelay on; | |
| } | |
| # ========================= | |
| # WebSocket Support | |
| # ========================= | |
| location /socket { | |
| proxy_pass http://127.0.0.1:8096/socket; | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection "Upgrade"; | |
| proxy_set_header Host $host; | |
| proxy_read_timeout 3600s; | |
| } | |
| # ========================= | |
| # Security Headers | |
| # ========================= | |
| add_header X-Frame-Options "SAMEORIGIN" always; | |
| add_header X-Content-Type-Options "nosniff" always; | |
| add_header X-XSS-Protection "1; mode=block" always; | |
| # ========================= | |
| # SSL Configuration | |
| # ========================= | |
| listen 443 ssl http2; | |
| ssl_certificate /etc/letsencrypt/live/de.bevq.in/fullchain.pem; | |
| ssl_certificate_key /etc/letsencrypt/live/de.bevq.in/privkey.pem; | |
| include /etc/letsencrypt/options-ssl-nginx.conf; | |
| ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; | |
| } | |
| # ========================= | |
| # HTTP → HTTPS Redirect | |
| # ========================= | |
| server { | |
| listen 80; | |
| server_name de.bevq.in; | |
| return 301 https://$host$request_uri; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment