digitalfondue / lavagna

Lavagna: issue tracker/project management tool
http://lavagna.io
GNU General Public License v3.0
635 stars 109 forks source link

[HELP] Connection Failure. #123

Closed mzch closed 4 years ago

mzch commented 4 years ago

Whenever logging in, Lavagna notifies 'Connection failure. Please reload the page.' But even reloading, the same notification shows. It seems that this happens in stomp_client.js. Additionally, I can't log out. I tried on 4 browsers, but the result is same. How can I fix this issue?

SitoCH commented 4 years ago

Hi, unfortunately I use NGINX so I don't know how Apache works, did you check issue #46? This reply is likely to fix your issue: https://github.com/digitalfondue/lavagna/issues/46#issuecomment-368781249

mzch commented 4 years ago

Yes, but not fixed.

ScreenShot 2019-11-24 3 12 21

and I tried nginx, but the result is same.

ScreenShot 2019-11-24 3 20 34

map $http_upgrade $proxy_connection { default upgrade; '' close; }

upstream lavagna.address { server 127.0.0.1:8081; }

server { listen 80; listen [::]:80; server_name procissue.com www.procissue.com; if ($host = www.procissue.com) { return 301 https://$host$request_uri; } # managed by Certbot if ($host = procissue.com) { return 301 https://$host$request_uri; } # managed by Certbot return 404; # managed by Certbot }

server {

listen [::]:443 ssl http2; # managed by Certbot
listen 443 ssl http2; # managed by Certbot
server_name procissue.com www.procissue.com;

ssl_certificate /etc/letsencrypt/live/procissue.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/procissue.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

if ($host = www.procissue.com) {
    return 301 http://procissue.com$request_uri;
}

location / {
    proxy_http_version 1.1;
    proxy_buffering off;
    proxy_set_header Host $http_host;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $proxy_connection;
    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 $proxy_x_forwarded_proto;
    # Mitigate httpoxy attack (see README for details)
    proxy_set_header Proxy "";
    proxy_pass http://lavagna.address;
}

}

mzch commented 4 years ago

I placed back 1.1.2, then this issue never happened. Is this a bug in 1.1.3?

SitoCH commented 4 years ago

I'm using version 1.1.3 without issues, there may be a bug but I find it a bit unlikely. Looking at your NGINX configuration it seems that you are missing this:

underscores_in_headers on;
proxy_set_header Origin '';
proxy_pass_header X-XSRF-TOKEN;

Can you add this elements and check if it works?

mzch commented 4 years ago

Great! Resolved. Thanks @SitoCH ! I still wonder what directives are put in Apache...

SitoCH commented 4 years ago

I'm glad I could help