Join the conversation

Sign in to join this conversation, and others like it, in the communities you care about.

Wekan

Wekan is an open-source kanban board (Trello like) which allows a card-based task and to-do management.

Wekan / General

Infinite loop on sign in

Infinite loop on sign in

Wekan / General · March 31, 2020 at 6:44pm

Hi,

new installation on FreeBSD 12.1, behind nginx with sub url. Upon signin the screen doesn't change. In the nginx logs I see an infinite loop:

"GET /wekan/ HTTP/1.1" 200
"GET /wekan/ HTTP/1.1" 200
"GET /wekan/sockjs/info?cb=b6qx4vrd93 HTTP/1.1" 200
"POST /wekan/sockjs/089/mkrfzaey/xhr HTTP/1.1" 200
"POST /wekan/sockjs/089/mkrfzaey/xhr_send HTTP/1.1" 204
"POST /wekan/sockjs/089/mkrfzaey/xhr_send HTTP/1.1" 204

This loops and the value after /wekan/sockjs/info?cb= changes each time. This makes me think there's an issue with the reverse proxy setup. Here's my nginx config.

location /wekan {
# proxy_pass http://127.0.0.1:3001/wekan;
proxy_pass http://127.0.0.1:2000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; # allow websockets
proxy_set_header Connection $connection_upgrade;
#proxy_set_header X-Forwarded-For $remote_addr; # preserve client IP
# this setting allows the browser to cache the application in a way compatible with Meteor
# on every applicaiton update the name of CSS and JS file is different, so they can be cache infinitely (here: 30 days)
# the root path (/) MUST NOT be cached
if ($uri != '/wekan') {
expires 30d;
}
}

Any ideas? Kind regards


March 31, 2020 at 7:48pm

Do you also have that map part at top of config like at https://github.com/wekan/wekan/wiki/Nginx-Webserver-Config

    • reply
    • like
    # this section is needed to proxy web-socket connections
    map $http_upgrade $connection_upgrade {
    default upgrade;
    '' close;
    }
      • reply
      • like

      For Wekan itself, in environment variables you need these:

      ROOT_URL=https://example.com/wekan
      PORT=2000
        • reply
        • like

        I usually try to avoid sub-url configs, and prefer to setup wekan to subdomain, like https://boards.example.com

          • reply
          • like

          This is because if later URL is changed from sub-url to sub-domain, it breaks avatar etc image paths, so they need to be corrected at database

            • reply
            • like

            Another way to get nginx config to get confused, is to add some PHP or other non-Wekan config to same Nginx .conf file

              • reply
              • like

              For example related to Drupal or some other web framework

                • reply
                • like

                Wekan Nginx config works best on subdomain and without additional rules

                  • reply
                  • like

                  I have not used that expires 30d, I don't know what effect it has

                    • reply
                    • like

                    April 1, 2020 at 6:02pm

                    Hi,

                      • reply
                      • like

                      I went the route of subdomain and now it works. Thanks for the assistance!

                        • reply
                        • like

                        Now time to discover how it works :)

                          Edited
                          • reply
                          • like

                          Thanks and welcome :)

                            • reply
                            • like