diffusionkinetics / open

DiffusionKinetics open-source monorepo
MIT License
115 stars 24 forks source link

Dampf: having both static and proxy in domain doesn't work #70

Open glutamate opened 6 years ago

glutamate commented 6 years ago

If both a static directory and a proxy container are specified in a domain, the static resources are not served.

We (incorrectly) currently generate

server {
    listen 80;
    server_name platform.xx.com www.platform.xx.com;
    location / {
        proxy_pass http://127.0.0.1:3142;
        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;
    }
    listen 443 ssl;
    ssl_certificate /etc/letsencrypt/live/platf ....
}

We are supposed to be using try_files instead: https://stackoverflow.com/a/15467555