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 aade0429b..183d92153 100644 --- a/deployment/bare_metal/nginx/sites-available/gradido.conf.ssl.template +++ b/deployment/bare_metal/nginx/sites-available/gradido.conf.ssl.template @@ -42,19 +42,19 @@ server { # Frontend (default) location / { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Host $host; - - proxy_pass http://127.0.0.1:3000; - proxy_redirect off; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:3000; + proxy_redirect off; access_log $GRADIDO_LOG_PATH/nginx-access.frontend.log gradido_log; error_log $GRADIDO_LOG_PATH/nginx-error.frontend.log warn; - } + } # Backend location /graphql { @@ -112,6 +112,52 @@ server { error_log $GRADIDO_LOG_PATH/nginx-error.admin.log warn; } + # Federation + location /federation-5010 { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:5010; + proxy_redirect off; + + access_log $GRADIDO_LOG_PATH/nginx-access.federation-5010.log gradido_log; + error_log $GRADIDO_LOG_PATH/nginx-error.federation-5010.log warn; + } + + location /federation-5011 { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:5011; + proxy_redirect off; + + access_log $GRADIDO_LOG_PATH/nginx-access.federation-5011.log gradido_log; + error_log $GRADIDO_LOG_PATH/nginx-error.federation-5011.log warn; + } + + location /federation-5020 { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:5020; + proxy_redirect off; + + access_log $GRADIDO_LOG_PATH/nginx-access.federation-5020.log gradido_log; + error_log $GRADIDO_LOG_PATH/nginx-error.federation-5020.log warn; + } + # TODO this could be a performance optimization #location /vue { # alias /var/www/html/gradido/frontend/dist; diff --git a/deployment/bare_metal/nginx/sites-available/gradido.conf.template b/deployment/bare_metal/nginx/sites-available/gradido.conf.template index b4c7b3463..899809a39 100644 --- a/deployment/bare_metal/nginx/sites-available/gradido.conf.template +++ b/deployment/bare_metal/nginx/sites-available/gradido.conf.template @@ -27,19 +27,19 @@ server { # Frontend (default) location / { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Host $host; - - proxy_pass http://127.0.0.1:3000; - proxy_redirect off; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:3000; + proxy_redirect off; access_log $GRADIDO_LOG_PATH/nginx-access.frontend.log gradido_log; error_log $GRADIDO_LOG_PATH/nginx-error.frontend.log warn; - } + } # Backend location /graphql { @@ -98,6 +98,52 @@ server { error_log $GRADIDO_LOG_PATH/nginx-error.admin.log warn; } + # Federation + location /federation-5010 { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:5010; + proxy_redirect off; + + access_log $GRADIDO_LOG_PATH/nginx-access.federation-5010.log gradido_log; + error_log $GRADIDO_LOG_PATH/nginx-error.federation-5010.log warn; + } + + location /federation-5011 { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:5011; + proxy_redirect off; + + access_log $GRADIDO_LOG_PATH/nginx-access.federation-5011.log gradido_log; + error_log $GRADIDO_LOG_PATH/nginx-error.federation-5011.log warn; + } + + location /federation-5020 { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:5020; + proxy_redirect off; + + access_log $GRADIDO_LOG_PATH/nginx-access.federation-5020.log gradido_log; + error_log $GRADIDO_LOG_PATH/nginx-error.federation-5020.log warn; + } + # TODO this could be a performance optimization #location /vue { # alias /var/www/html/gradido/frontend/dist;