Looks like your connection to NodeBB was lost, please wait while we try to reconnect.

Technical Support
  • The following is my nodebb config.

    {
        "url": "https://www.ygnconnect.com",
        "secret": "839fa2da-d222-4d68-94a0-a9e07efe2ef5",
        "database": "mongo",
        "mongo": {
            "host": "127.0.0.1",
            "port": "27017",
            "username": "user",
            "password": "pass",
            "database": "db"
        }
    }
    

    And the following is my nginx config

    ### redirects http requests to https
    server {
        listen 80;
    
        server_name ygnconnect.com www.ygnconnect.com;
        return 301 https://www.ygnconnect.com$request_uri;
    
        return 302 https://$server_name$request_uri;
    }
    
    ### the https server
    server {
        # listen on ssl, deliver with speedy if possible
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
    
        server_name ygnconnect.com www.ygnconnect.com;
    
        if ($host = 'ygnconnect.com' ) {
                rewrite ^ https://www.ygnconnect.com$request_uri;
        }
    
        # change these paths!
        ssl_certificate /etc/letsencrypt/live/www.ygnconnect.com/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/www.ygnconnect.com/privkey.pem; # managed by Certbot
    
        # enables all versions of TLS, but not SSLv2 or 3 which are weak and now deprecated.
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
    
        location ~ /.well-known {
            allow all;
        }
    
       location / {
            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_set_header Host $http_host;
            proxy_set_header X-NginX-Proxy true;
    
            proxy_pass https://127.0.0.1:4567;
            proxy_redirect off;
    
            # Socket.IO Support
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }
    
    }
    

    Is there any idea why I am in trouble?

  • When I check the console, it show like the following

    Failed to load resource: the server responded with a status of 403 ()
    /socket.io/?EIO=3&transport=polling&t=L-PoHUg
    
  • The common causes for a session mismatch error are usually one of the following:

    1. Mis-configured URL parameter in your config.json file

    If you have a misconfigured url value in your config.json file, the cookie may be saved incorrectly (or not at all), causing a session mismatch error. Please ensure that the link you are accessing your site with and the url defined match.

    2. Improper/malformed cookieDomain set in ACP

    Sometimes admins set this value without realising that they probably don't need to set it at all. The default is perfectly fine. This is what the config looks like:

    Cookie Domain setting

    If this is set, you'll want to revert the setting by editing your database directly:

    Redis: hdel config cookieDomain
    MongoDB: db.objects.update({ _key: "config" }, { $set: "cookieDomain": "" });

    3. Missing X-Forwarded-Proto header from nginx/apache

    If you are using a reverse proxy, you will need to have nginx pass a header through to NodeBB so it correctly determines the correct cookie secure property.

    In nginx, you will need to add the directive like so:

    location / {
        ...
        proxy_set_header X-Forwarded-Proto $scheme;
        ...
    }
    
  • This post is deleted!


Suggested Topics


  • 0 Votes
    5 Posts
    223 Views
  • 0 Votes
    5 Posts
    762 Views
  • 0 Votes
    12 Posts
    3481 Views
  • 0 Votes
    8 Posts
    4287 Views
  • 9 Votes
    10 Posts
    3878 Views