From 3706fc10b9bd846d21d2244fa55fda15d1cfd0ad Mon Sep 17 00:00:00 2001 From: The_Markus Date: Wed, 12 Oct 2022 18:19:33 +0200 Subject: [PATCH] Added reverse proxy configuration for portainer (#480) --- .../portainer/third_party-portainer.de.md | 18 ++++++++++++++++ .../portainer/third_party-portainer.en.md | 21 ++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/docs/third_party/portainer/third_party-portainer.de.md b/docs/third_party/portainer/third_party-portainer.de.md index 3a3910bc1..095b64301 100644 --- a/docs/third_party/portainer/third_party-portainer.de.md +++ b/docs/third_party/portainer/third_party-portainer.de.md @@ -60,3 +60,21 @@ docker compose up -d && docker compose restart nginx-mailcow Nun können Sie einfach zu https://${MAILCOW_HOSTNAME}/portainer/ navigieren, um Ihre Portainer-Container-Überwachungsseite anzuzeigen. Sie werden dann aufgefordert, ein neues Passwort für den **admin** Account anzugeben. Nachdem Sie Ihr Passwort eingegeben haben, können Sie sich mit der Portainer UI verbinden. +--- + +## Reverse Proxy + +Wenn Sie einen Reverse-Proxy verwenden, muss dieser noch konfiguriert werden die Websocket Requests richtig weiterzuleiten. + +Dies wird für die Docker Konsole und andere Komponenten benötigt. + +Hier ist ein Bespiel für Apache: + +``` + + RewriteEngine on + RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC] + RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC] + RewriteRule /portainer/api/websocket/(.*) ws://127.0.0.1:8080/portainer/api/websocket/$1 [P] + +``` \ No newline at end of file diff --git a/docs/third_party/portainer/third_party-portainer.en.md b/docs/third_party/portainer/third_party-portainer.en.md index c81422bf8..72c23924f 100644 --- a/docs/third_party/portainer/third_party-portainer.en.md +++ b/docs/third_party/portainer/third_party-portainer.en.md @@ -58,4 +58,23 @@ map $http_upgrade $connection_upgrade { docker compose up -d && docker compose restart nginx-mailcow ``` -Now you can simply navigate to https://${MAILCOW_HOSTNAME}/portainer/ to view your Portainer container monitoring page. You’ll then be prompted to specify a new password for the **admin** account. After specifying your password, you’ll then be able to connect to the Portainer UI. \ No newline at end of file +Now you can simply navigate to https://${MAILCOW_HOSTNAME}/portainer/ to view your Portainer container monitoring page. You’ll then be prompted to specify a new password for the **admin** account. After specifying your password, you’ll then be able to connect to the Portainer UI. + +--- + +## Reverse Proxy + +If you are using a reverse proxy you will have to configure it to properly forward websocket requests. + +This needs to be done for the docker console and other components to work. + +Here is an example for Apache: + +``` + + RewriteEngine on + RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC] + RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC] + RewriteRule /portainer/api/websocket/(.*) ws://127.0.0.1:8080/portainer/api/websocket/$1 [P] + +``` \ No newline at end of file