From cec3b5763f7ed236b2cc6bdf670c9556f10c6fec Mon Sep 17 00:00:00 2001 From: pagliu_s Date: Mon, 16 Mar 2026 16:14:39 +0100 Subject: [PATCH] add config for revproxy --- conf.d/mcda-up.psi.ch.conf | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 conf.d/mcda-up.psi.ch.conf diff --git a/conf.d/mcda-up.psi.ch.conf b/conf.d/mcda-up.psi.ch.conf new file mode 100644 index 0000000..718de70 --- /dev/null +++ b/conf.d/mcda-up.psi.ch.conf @@ -0,0 +1,29 @@ +server { + listen 80; + server_name mcda-up.psi.ch; + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl; + server_name mcda-up.psi.ch; + + ssl_certificate /etc/nginx/certs/mcda-up.psi.ch.crt; + ssl_certificate_key /etc/nginx/private/mcda-up.psi.ch.key; + + location /api/ { + proxy_pass http://up-mavt-suite-backend:5000/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 $scheme; + } + + location / { + proxy_pass http://up-mavt-suite-frontend:3000; + 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 $scheme; + } +}