open icon indicating copy to clipboard operation
open copied to clipboard

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

Open glutamate opened this issue 6 years ago • 0 comments

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

glutamate avatar Mar 07 '18 18:03 glutamate