workadventure/contrib/nginx.conf
2022-02-11 01:48:25 +01:00

43 lines
1.2 KiB
Nginx Configuration File

# vim: syntax=conf
map $http_host $krautworld_upstream {
hostnames;
default http://127.0.0.1:8000;
icon.kraut.world http://127.0.0.1:7999;
play.kraut.world http://127.0.0.1:8001;
pusher.kraut.world http://127.0.0.1:8002;
api.kraut.world http://127.0.0.1:8003;
maps.kraut.world http://127.0.0.1:8004;
play.dev.kraut.world http://127.0.0.1:8011;
pusher.dev.kraut.world http://127.0.0.1:8012;
api.dev.kraut.world http://127.0.0.1:8013;
maps.dev.kraut.world http://127.0.0.1:8014;
}
server {
listen 127.0.0.1:8443 ssl http2;
listen [::1]:8443 ssl http2;
server_name .kraut.world .dev.kraut.world;
ssl_certificate /var/lib/dehydrated/certs/play.kraut.world/fullchain.pem;
ssl_certificate_key /var/lib/dehydrated/certs/play.kraut.world/privkey.pem;
set $HSTS_header "max-age=16000000";
location / {
proxy_pass $krautworld_upstream;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_pass_header Set-Cookie;
}
}