#Use this example for the proxy document server running at 'backendserver-address'# into the virtual directory 'documentserver-virtual-path'.upstream docservice { server backendserver-address;}map $http_x_forwarded_proto $the_scheme { default $http_x_forwarded_proto; "" $scheme;}map $http_x_forwarded_host $the_host { default $http_x_forwarded_host; "" $host;}map $http_upgrade $proxy_connection { default upgrade; "" close;}proxy_set_header Upgrade $http_upgrade;proxy_set_header Connection $proxy_connection;proxy_set_header X-Forwarded-Host $the_host/documentserver-virtual-path;proxy_set_header X-Forwarded-Proto $the_scheme;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;server { listen 0.0.0.0:80; listen [::]:80 default_server; server_tokens off; location /documentserver-virtual-path/ { proxy_pass http://docservice/; proxy_http_version 1.1; }}
proxy_set_header Upgrade $http_upgrade;proxy_set_header Connection $proxy_connection;proxy_set_header X-Forwarded-Host $the_host/documentserver-virtual-path;proxy_set_header X-Forwarded-Proto $the_scheme;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
if ($scheme != "https") { return 302 https://$host$request_uri; } autoindex off; http2_push_preload off; proxy_set_header Host $host; proxy_set_header X-TLS-Cipher $ssl_cipher; proxy_set_header X-TLS-Protocol $ssl_protocol; proxy_set_header X-TLS-SNI-Host $ssl_server_name; # proxy headers for backend server 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; proxy_pass http://upstream50c9cb5f9daa4878ab3cf696f9e0416d;
proxy_set_header X-Forwarded-Host $the_host/documentserver-virtual-path;
ERR_TOO_MANY_REDIRECTS
so sieht meine location section ausCode: [Select] if ($scheme != "https") { return 302 https://$host$request_uri; } autoindex off; http2_push_preload off; proxy_set_header Host $host; proxy_set_header X-TLS-Cipher $ssl_cipher; proxy_set_header X-TLS-Protocol $ssl_protocol; proxy_set_header X-TLS-SNI-Host $ssl_server_name; # proxy headers for backend server 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; proxy_pass http://upstream50c9cb5f9daa4878ab3cf696f9e0416d;
damit sind meiner Meinung nach alle Punkte außerCode: [Select]proxy_set_header X-Forwarded-Host $the_host/documentserver-virtual-path;mit abgebacken
Als Fehlermeldung erhalte ich im BrowserQuoteERR_TOO_MANY_REDIRECTS
Was es bedeutet ist klar, allerdings ist mir nicht klar wie es lösen kann. Ich denke es liegt am Header für X-Forwarded-Host. Gibt es die Möglichkeit zusäzlicher header optionen hinzuzufügen Danke shb
docker run -i -t -d -p 8181:80 --restart=always onlyoffice/documentserver