From 9f5abb4e12dbfa7bb3cfb8e798ad9279c0a862b5 Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Thu, 19 Dec 2024 16:54:21 +0100 Subject: [PATCH] Add nmc-remote-access.apps.ebrains.eu as an alternative URL --- api/deployment/nginx-app-prod.conf | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/api/deployment/nginx-app-prod.conf b/api/deployment/nginx-app-prod.conf index 7685475..8b9e901 100644 --- a/api/deployment/nginx-app-prod.conf +++ b/api/deployment/nginx-app-prod.conf @@ -11,6 +11,13 @@ server { return 301 https://nmpi-v3.hbpneuromorphic.eu$request_uri; } +server { + listen 80; + + server_name nmc-remote-access.apps.ebrains.eu + return 301 https://nmc-remote-access.apps.ebrains.eu$request_uri; +} + server { listen 443 ssl; @@ -41,6 +48,36 @@ server { } +server { + listen 443 ssl; + + ssl_certificate /etc/letsencrypt/live/nmc-remote-access.apps.ebrains.eu/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/nmc-remote-access.apps.ebrains.eu/privkey.pem; + + server_name nmc-remote-access.apps.ebrains.eu; + charset utf-8; + client_max_body_size 4G; + + location / { + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_redirect off; + proxy_buffering off; + proxy_pass http://uvicorn; + proxy_read_timeout 300s; + } + + location /static { + alias /home/docker/site/static; + } + + location /tmp_download { + alias /home/docker/site/tmp_download; + } + +} + server { listen 443 ssl;