diff --git a/conf.d/it-dashboard.conf b/conf.d/it-dashboard.conf new file mode 100644 index 0000000..124d9c0 --- /dev/null +++ b/conf.d/it-dashboard.conf @@ -0,0 +1,28 @@ +server { + listen 80; + server_name it-strategy-dashboard.psi.ch; + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl; + server_name it-strategy-dashboard.psi.ch; + + ssl_certificate /etc/nginx/certs/it-strategy-dashboard.psi.ch.crt; + ssl_certificate_key /etc/nginx/private/it-strategy-dashboard.psi.ch.key; + + root /opt/webcontent/it-strategy-dashboard; + index index.html; + + location / { + try_files $uri /index.html; + } + + location /api/ { + proxy_pass http://it-strategy-dashboard-backend:8080; + 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; + } +}