Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
glutamate opened this issue Mar 7, 2018 · 0 comments
Open

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

glutamate opened this issue Mar 7, 2018 · 0 comments
Labels

Comments

@glutamate
Copy link
Member

glutamate commented Mar 7, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant