HEX
Server: nginx/1.29.3
System: Linux 11979.bigscoots-wpo.com 6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 x86_64
User: nginx (1068)
PHP: 7.4.33
Disabled: exec,system,passthru,shell_exec,proc_open,proc_close,popen,show_source,cmd# Do not modify this line # 1684243876
Upload Files
File: //bigscoots/lxd/containers.conf
# /etc/nginx/conf.d/containers.conf

# Map hostnames to container IPs
map $host $target {
    default 127.0.0.1;  # fallback (could 404)

    # --- generated mappings ---
    container-01.bigscoots-app.com 10.20.5.11;
    container-02.bigscoots-app.com 10.20.5.12;
    container-03.bigscoots-app.com 10.20.5.13;
    container-04.bigscoots-app.com 10.20.5.14;
    container-05.bigscoots-app.com 10.20.5.15;
    container-06.bigscoots-app.com 10.20.5.16;
    container-07.bigscoots-app.com 10.20.5.17;
    container-08.bigscoots-app.com 10.20.5.18;
    container-09.bigscoots-app.com 10.20.5.19;
    container-10.bigscoots-app.com 10.20.5.20;
    container-11.bigscoots-app.com 10.20.5.21;
    container-12.bigscoots-app.com 10.20.5.22;
    container-13.bigscoots-app.com 10.20.5.23;
    container-14.bigscoots-app.com 10.20.5.24;
    container-15.bigscoots-app.com 10.20.5.25;
    container-16.bigscoots-app.com 10.20.5.26;
    container-17.bigscoots-app.com 10.20.5.27;
    container-18.bigscoots-app.com 10.20.5.28;
    container-19.bigscoots-app.com 10.20.5.29;
    container-20.bigscoots-app.com 10.20.5.30;
}

# HTTP listener (can keep it HTTP-only for now; add TLS later)
server {
    listen 80 reuseport;
    listen [::]:80 reuseport;

    # Optional: respond to bare domain with 404 instead of default container
    # server_name bigscoots-app.com;

    # Proxy to the chosen container by Host header
    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_read_timeout 60s;
        proxy_connect_timeout 5s;

        proxy_pass http://$target;
    }
}