1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-16 00:00:03 +01:00
VILLASweb/nginx-conf.d/default.conf
Markus Grigull 16fef1ae47 Change absolute layout into scrollable
Replaced last svg-image with png
Removed unnecessary css
2016-06-23 14:19:08 +02:00

45 lines
1.3 KiB
Text

server {
listen 80 default_server;
server_name labmashup;
# proxy for orion context broker
location /api/ {
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
if ($request_method = 'OPTIONS') {
add_header Access-Control-Allow-Origin '$http_origin' always;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS, PUT, DELETE' always;
add_header Access-Control-Allow-Credentials 'true' always;
add_header Access-Control-Allow-Headers 'Origin,Content-Type,Accept' always;
add_header Content-Length 0;
add_header Content-Type text/plain;
return 204;
}
# rewrite url to exclude /api on context broker side
rewrite ^/api/?(.*) /$1 break;
add_header Access-Control-Allow-Origin '*' always;
add_header Access-Control-Allow-Credentials 'true' always;
proxy_pass http://orion:1026/;
}
# website location
location / {
root /www;
}
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;
}
}