34 lines
1.4 KiB
Text
34 lines
1.4 KiB
Text
# ─────────────────────────────────────────────────────────────
|
|
# Greendale Media Centre — Nginx Reverse Proxy Config
|
|
# SUBPATH variant: https://yourdomain.com/media/
|
|
#
|
|
# Use this if you want to host under a path on an existing domain
|
|
# instead of a dedicated subdomain.
|
|
#
|
|
# NOTE: The Flask app already serves from "/" — Nginx strips the
|
|
# /media prefix and the app sees clean paths.
|
|
# ─────────────────────────────────────────────────────────────
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
server_name yourdomain.com;
|
|
|
|
# ... your existing SSL/other config above ...
|
|
|
|
# ── Proxy to Greendale Media Centre ──
|
|
location /media/ {
|
|
proxy_pass http://YOUR_UNRAID_IP:5055/;
|
|
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_redirect off;
|
|
proxy_read_timeout 90;
|
|
|
|
# Required so cookies set at "/" work on the /media/ sub-path
|
|
proxy_cookie_path / /media/;
|
|
}
|
|
}
|