• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Issue Portainer behind nginx reverse proxy

Gagi

New Pleskian
Hi,

i'm currently trying to run portainer on my VPS which is manged by plesk.

The portainer container (docker) is running on port 9000 and i would like to create nginx reverse proxy on one of my subdomains to forward the https requests as http request to portainer.

The container as such is working fine and i can access it using http://<domain>:9000

For the nginx setup i setup the new subdomain. Disabled nginx proxy mode in plesk and added the following rule (i also tried a lot of other rules without success):

Code:
location / {
    proxy_set_header Host $host;
    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://0.0.0.0:9000/;
    proxy_read_timeout 90;
}

The nginx doesn't seem to be working correctly, as i'm not getting: ERR_TOO_MANY_REDIRECTS on chrome and can see constant redirects to same https:// url using curl.

Did anyone tried to setup portainer behind nginx yet ? The alternative would be to run nginx or traefik inside a container as well and use a docker-compose file, but with that i can't easily reuse the wildcard certificates managed by plesk, can i ?

Thx
Gagi
 
Hi,

i found the solution to my problem and this needs to be done for every html page which should be proxied by nginx.

The problem is that nginx tries to deliver all index.html (and a few more) itself and doesn't forward the request in those cases. For the proxy to work, this needs to be disabled.

This can be done in the same hosting settings page. On the top select "Indexing files" -> "Own Value" -> Remove the content there and add a space (this is needed to save the change, otherwise it will just revert to the default again).

Gagi
 
Back
Top