Skip to content

404 with director behind reverse proxy #779

Closed Answered by TheZoker
TheZoker asked this question in Q&A
Discussion options

You must be logged in to vote

I found a solution 🎉

Instead of writing:

location /director {
    proxy_pass http://director:1234;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
}

I had to write:

location /director {
    rewrite ^/director(/?.*)$ $1 break;                 // This line is important
    proxy_pass http://director:1234;
    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;
    proxy_buffering off;
    proxy_redirect off;
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by TheZoker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant