Skip to content

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

@glutamate

Description

@glutamate

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions