funkwhale/deploy/nginx.conf

34 wiersze
819 B
Nginx Configuration File
Czysty Zwykły widok Historia

upstream funkwhale-api {
# depending on your setup, you may want to udpate this
server localhost:5000;
}
server {
listen 80;
server_name demo.funkwhale.audio;
root /srv/funkwhale/front/dist;
location / {
try_files $uri $uri/ @rewrites;
}
location @rewrites {
rewrite ^(.+)$ /index.html last;
}
location /api/ {
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 https;
proxy_redirect off;
proxy_pass http://funkwhale-api/api/;
}
location /media/ {
alias /srv/funkwhale/data/media/;
}
location /staticfiles/ {
alias /srv/funkwhale/data/staticfiles/;
}
}