diff --git a/deployment/bare_metal/nginx/sites-available/gradido.conf.ssl.template b/deployment/bare_metal/nginx/sites-available/gradido.conf.ssl.template index 9a891d1ac..8fa8d746f 100644 --- a/deployment/bare_metal/nginx/sites-available/gradido.conf.ssl.template +++ b/deployment/bare_metal/nginx/sites-available/gradido.conf.ssl.template @@ -25,6 +25,12 @@ server { #gzip_static on; + # Legacy URLS + set $REWRITE_LEGACY_URLS "$NGINX_REWRITE_LEGACY_URLS"; + if ($REWRITE_LEGACY_URLS = 'true') { + rewrite ^/vue$1 /$1 permanent; + } + # Frontend (default) location / { proxy_http_version 1.1; @@ -64,13 +70,6 @@ server { proxy_pass http://127.0.0.1:8080/; proxy_redirect off; } - - # Legacy URLS - set $REWRITE_LEGACY_URLS "$NGINX_REWRITE_LEGACY_URLS"; - if ($REWRITE_LEGACY_URLS = 'true') { - rewrite ^/vue$1 /$1 permanent; - } - # TODO this could be a performance optimization #location /vue { diff --git a/deployment/bare_metal/nginx/sites-available/gradido.conf.template b/deployment/bare_metal/nginx/sites-available/gradido.conf.template index b48e6da7b..4464e407e 100644 --- a/deployment/bare_metal/nginx/sites-available/gradido.conf.template +++ b/deployment/bare_metal/nginx/sites-available/gradido.conf.template @@ -10,6 +10,12 @@ server { #gzip_static on; + # Legacy URLS + set $REWRITE_LEGACY_URLS "$NGINX_REWRITE_LEGACY_URLS"; + if ($REWRITE_LEGACY_URLS = 'true') { + rewrite ^/vue$1 /$1 permanent; + } + # Frontend (default) location / { proxy_http_version 1.1; @@ -50,12 +56,6 @@ server { proxy_redirect off; } - # Legacy URLS - set $REWRITE_LEGACY_URLS "$NGINX_REWRITE_LEGACY_URLS"; - if ($REWRITE_LEGACY_URLS = 'true') { - rewrite ^/vue$1 /$1 permanent; - } - # TODO this could be a performance optimization #location /vue { # alias /var/www/html/gradido/frontend/dist;