2023-11-22 21:12:36 +01:00
|
|
|
server {
|
|
|
|
listen 443 ssl;
|
|
|
|
# kelder.zeus.ugent.be irc.zeus.ugent.be zeusgw.ugent.be endymion.ugent.be
|
|
|
|
# all point to here
|
|
|
|
server_name kelder.zeus.ugent.be zeusgw.ugent.be;
|
|
|
|
|
|
|
|
#############
|
|
|
|
# LOCATIONS #
|
|
|
|
#############
|
|
|
|
|
|
|
|
rewrite ^/$ https://zeus.ugent.be/ permanent;
|
|
|
|
|
|
|
|
# This uses https://github.com/vvidic/mjpeg-proxy to proxy MJPG cameras so only one stream
|
|
|
|
# per camera is opened
|
|
|
|
location ~ ^/camera/(.*)$ {
|
2023-12-06 20:43:16 +01:00
|
|
|
proxy_pass http://mjpeg-proxy.:8080/$1$is_args$args;
|
2023-11-22 21:12:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
location /webcam/cgi/ptdc.cgi {
|
|
|
|
add_header 'Access-Control-Allow-Origin' '*';
|
|
|
|
try_files /tmp/freeze_camera @cammie_movement;
|
|
|
|
}
|
|
|
|
|
|
|
|
location @cammie_movement {
|
|
|
|
# Cammie movement commands
|
|
|
|
proxy_pass http://10.0.0.7/cgi/ptdc.cgi$is_args$args;
|
|
|
|
expires off;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Slotmachien
|
|
|
|
location /lockbot {
|
|
|
|
proxy_pass http://10.0.1.5/;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /fingerprint {
|
|
|
|
proxy_pass http://10.0.1.15/;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /messages {
|
2024-10-02 20:42:03 +02:00
|
|
|
proxy_pass http://10.0.0.9:3000/messages;
|
2024-10-02 20:43:28 +02:00
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
2023-11-22 21:12:36 +01:00
|
|
|
add_header 'Access-Control-Allow-Origin' '*';
|
|
|
|
add_header 'Access-Control-Allow-Headers' 'X-Username';
|
|
|
|
}
|
|
|
|
|
2024-10-02 20:43:28 +02:00
|
|
|
location /loxsi/ {
|
|
|
|
rewrite /loxsi/(.*) /$1 break;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
proxy_redirect off;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "Upgrade";
|
|
|
|
proxy_pass http://10.0.20.20:8000/;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-11-22 21:12:36 +01:00
|
|
|
location /kelderapi/ {
|
2024-10-02 20:42:03 +02:00
|
|
|
proxy_pass http://10.0.0.9:5000/kelderapi/;
|
2023-11-22 21:12:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
location /socket.io/ {
|
|
|
|
proxy_redirect off;
|
|
|
|
proxy_pass_request_headers on;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
|
|
proxy_set_header X-Forwarded-Server $host;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
2023-12-07 20:37:12 +01:00
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
2023-11-22 21:12:36 +01:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Host $host;
|
2024-10-11 14:25:58 +02:00
|
|
|
proxy_pass http://10.0.0.9:3000/socket.io/;
|
2023-11-22 21:12:36 +01:00
|
|
|
}
|
2024-10-02 20:43:28 +02:00
|
|
|
|
2023-11-22 21:12:36 +01:00
|
|
|
}
|
|
|
|
|
2024-10-02 20:43:28 +02:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
listen [::]:80;
|
|
|
|
|
|
|
|
server_name kelder.zeus.ugent.be zeusgw.ugent.be;
|
|
|
|
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
|
|
root /var/www/certbot;
|
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
|
|
|
return 301 https://$host$request_uri;
|
|
|
|
}
|
|
|
|
}
|