Moved to new domain how do i update nodebb domain name?


  • config.json

    {
        "base_url": "http://forum.fangsniping.tk",
        "port": "8020",
        "use_port": true,
        "secret": "secrets",
        "bind_address": "5.135.106.27",
        "database": "mongo",
        "mongo": {
            "host": "127.0.0.1",
            "port": "27017",
            "username": "DONT",
            "password": "HACKME",
            "database": "IMLOOKINGATYOUPSYCHOBUNNY"
        },
        "bcrypt_rounds": 12,
        "upload_path": "/public/uploads",
        "relative_path": ""
    }
    

    nginx (nothing in conf.d so heres the other thing)

    server {
            listen   80; 
    		root /var/www/;
            index index.php index.html index.htm;
    
            server_name fangsniping.tk; 
    
            location / {
            try_files $uri $uri/ /index.php;
            }
    
            location ~ \.php$ {
            
            proxy_set_header X-Real-IP  $remote_addr;
            proxy_set_header X-Forwarded-For $remote_addr;
            proxy_set_header Host $host;
            proxy_pass http://127.0.0.1:8080;
    
             }
    
             location ~ /\.ht {
                    deny all;
            }
    }
    upstream nodebb {
        server 5.135.106.27:8020;
    }
    
    server {
        listen 80;
    
        server_name forum.fangsniping.tk;
        root /home/alpha22/fangnode/nodebb;
    
        location / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_set_header X-NginX-Proxy true;
    
            proxy_pass http://nodebb/;
            proxy_redirect off;
    
            # Socket.IO Support
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }
    }
    

    Nginx version
    1.2.1

  • Plugin & Theme Dev

    hmm .. i think the requirements are a minimum nginx version of 1.3.13


  • just updated to 1.4.4 and still same problem

    @bentael

  • GNU/Linux Admin

    Hey @xCausxn -- this may be the cause of your problems... šŸ™‚

    http://forum.fangsniping.tk/api/config
    
    {
      "error": "/home/alpha22/fangnode/nodebb/public/config.json: Unexpected string"
    }
    
  • Admin

    rofl

        "port": "27017",
        "username": "DONT",
        "password": "HACKME",
        "database": "IMLOOKINGATYOUPSYCHOBUNNY"
    

  • i was trying a fix on another thread to add this

    "websocket": {
    "address": "5.135.106.27",
    "port": "8020"
    }

    which threw that error

  • GNU/Linux Admin

    Yeah, you shouldn't need that to have nginx work as a proxy. See our config.json here: http://community.nodebb.org/config.json

    Just remove that section and see where you end up.


  • Just removed, however i have found something. if i login, i can access the admin panel - Good + Forum loads fine = good

    However,
    http://puu.sh/6wvBH.png

    but im logged in šŸ˜›

  • GNU/Linux Admin

    Good, now we're getting somewhere -- it looks like Web Sockets is not working, possibly because the proxy configuration is not correct.

    Is your NodeBB hosted on the same machine as the nginx server? If so, you can change the upstream portion to this:

    upstream nodebb {
        server 127.0.0.1:8020;
    }
    

    Also not sure if "bind_address": "5.135.106.27", needs to be set, you could leave it as 0.0.0.0 and see what happens.


  • Ok just made those changes, same as before the logged in doesnt show, but i am logged in šŸ˜›

  • GNU/Linux Admin

    You may need to restart your nginx server (and nodebb, for good measure)


  • i have šŸ™‚


  • its definitely something to do with sockets i think

Suggested Topics

| |