container-director/director.conf

20 lines
565 B
Plaintext
Raw Permalink Normal View History

2022-08-24 23:05:43 +01:00
server {
listen 8080;
2022-08-24 23:05:43 +01:00
server_name _;
resolver 127.0.0.11 valid=1s;
location / {
2022-08-27 21:32:45 +01:00
proxy_pass http://${CONTAINER_PREFIX}-$http_x_forwarded_preferred_username:${CONTAINER_PORT};
proxy_set_header Host ${CONTAINER_PREFIX}-$http_x_forwarded_preferred_username;
2022-08-27 21:22:33 +01:00
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
proxy_set_header Accept-Encoding gzip;
2022-08-24 23:05:43 +01:00
error_page 502 = @spawner;
}
location @spawner {
proxy_pass http://${SPAWNER_HOST}:8080$uri;
2022-08-24 23:05:43 +01:00
}
}