planka behind a nginx reverse proxy not working

See original GitHub issue

I am running the latest version of planka, straight from the master.

I have modified start script of client to serve it on port 3006. And here is part of my nginx configuration

location /planka/ {
    proxy_pass http://localhost:3006/;
}

This should serve the content on mydomain.com/planka. This does partially happens as I can see the index.html page being loaded at /planka/. But this is what I get in the console.

image


I have been in a similar situation with grafana, but luckily there is such a mechanism in grafana which allows hosting from sub path.

What are your views on this? Any workaround?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:18 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
janwels89commented, Sep 9, 2021

Seems like its only possible to reverse proxy planka to the root of a domain. I could not get a reverse proxy to https:‘domain_here’/planka/ working… there is static/… stuff missing…

image

reverse proxy to / on the domain is working fine.

1reaction
rubenmdhcommented, Apr 8, 2021

I was struggling to get this to work, too. Finally got it working yesterday behind nginx.

This is my nginx related config:

location / {
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $host;

                proxy_pass http://backend;

                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
        }

Backend should be outside of the server tag: (I used eth0 IPv4 address, but I guess localhost or 127.0.0.1 should suffice)

upstream backend {
        ip_hash;
        server 192.168.4.23:3000;
}

Also make sure to configure the docker-compose.yml accordingly. I had to configure the BASE_URL to the exact url that was configured in nginx. eg: BASE_URL=https://planka.example.com

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - planka behind a nginx reverse proxy not working -
I am running the latest version of planka, straight from the master. I have modified start script of client to serve it on...
Read more >
NGINX Reverse Proxy | NGINX Plus - NGINX Documentation
Configure NGINX as a reverse proxy for HTTP and other protocols, with support for modifying request headers and fine-tuned buffering of responses.
Read more >
Running behind reverse proxy — Flower 1.0.1 documentation
To run Flower behind a reverse proxy, remember to set the correct Host header to the request to make ... The following is...
Read more >
Nginx Grafana Reverse Proxy - Apicella Gomme
Now to add a reverse proxy to our Grafana server. planka behind a nginx reverse proxy not working. You will learn how to...
Read more >
How to setup an Nginx reverse proxy server example
This Nginx reverse proxy example uses Tomcat as the origin server, but any backend server, such as Node, Jetty or WebSphere, will work....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found