• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

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

Scheduled Pinned Locked Moved Technical Support
nginxnodebbconnection losterror
4 Posts 3 Posters 2.7k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • setkyarS Offline
    setkyarS Offline
    setkyar
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
  • setkyarS Offline
    setkyarS Offline
    setkyar
    wrote on last edited by
    #2

    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
    
    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #3

    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;
        ...
    }
    
    1 Reply Last reply
    0
  • Sum1SolutionsS Offline
    Sum1SolutionsS Offline
    Sum1Solutions
    wrote on last edited by
    #4
    This post is deleted!
    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development