1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-30 00:00:13 +01:00
VILLASweb/nginx/villas.conf
2017-04-13 08:59:38 +02:00

32 lines
651 B
Text

server {
listen 80 default_server;
server_name VILLASweb;
# backend location
location /api/ {
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# rewrite url to exclude /api on context broker side
rewrite ^/api/?(.*) /api/v1/$1 break;
proxy_pass http://backend:4000/;
}
# frontend location
location / {
root /www;
}
# error pages
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
error_page 500 502 503 504 50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}