japanese-drum-game/tools/nginx_subdir.conf
KatieFrogs fd32ecb004 Add base directory support
- Base directory can be changed in config.py from the default / to, for example, /taiko-web/
  - See tools/nginx_subdir.conf for an example nginx configuration with a base directory
- Custom error pages can be used, they can be set in config.py
2022-08-21 22:48:24 +02:00

29 lines
725 B
Plaintext

server {
listen 80;
#server_name taiko.example.com;
location /taiko-web/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $server_name;
proxy_pass http://127.0.0.1:34801;
}
location ~ ^/taiko-web/(assets|songs|src)/ {
rewrite ^/taiko-web/(.*) /$1 break;
root /srv/taiko-web/public;
location ~ ^/taiko-web/songs/([0-9]+)/preview\.mp3$ {
set $id $1;
rewrite ^/taiko-web/(.*) /$1 break;
try_files $uri /taiko-web/api/preview?id=$id;
}
}
location /taiko-web/p2 {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass http://127.0.0.1:34802;
}
}