configure nginx for federation

This commit is contained in:
Claus-Peter Hübner 2023-02-27 20:29:49 +01:00
parent d987fa9ab4
commit 8b6f707931
2 changed files with 49 additions and 3 deletions

View File

@ -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;

View File

@ -99,7 +99,7 @@ server {
}
# Federation
location /graphql {
location /federation-5010 {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
@ -114,7 +114,7 @@ server {
error_log $GRADIDO_LOG_PATH/nginx-error.federation-5010.log warn;
}
location /graphql {
location /federation-5011 {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
@ -129,7 +129,7 @@ server {
error_log $GRADIDO_LOG_PATH/nginx-error.federation-5011.log warn;
}
location /graphql {
location /federation-5020 {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';