mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
43 lines
881 B
Text
43 lines
881 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/$1 break;
|
|
|
|
proxy_pass http://backend:4000/;
|
|
}
|
|
|
|
location /ws/api/ {
|
|
proxy_pass http://node/api/;
|
|
}
|
|
|
|
location /ws {
|
|
proxy_pass http://node/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|
|
|
|
# frontend location
|
|
location / {
|
|
root /usr/src/app/build/;
|
|
}
|
|
|
|
# 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;
|
|
}
|
|
}
|