in 1.5.0 entering www. gives error "Looks like your connection to [sitename] was lost, please wait while we try to reconnect."
-
@PitaJ said in in 1.5.0 entering www. gives error "Looks like your connection to [sitename] was lost, please wait while we try to reconnect.":
How did you set up NodeBB in the first place?
A friend of me did, but I'm trying to do every time a little bit more myself... well... with a lot of help from you guys
@PitaJ said in in 1.5.0 entering www. gives error "Looks like your connection to [sitename] was lost, please wait while we try to reconnect.":
The nginx config is located at /etc/nginx/sites-available/ and will be called something like nodebb or example.com
Thank you, I go try
-
I can't see it. I looked in
/etc/
/usr/local/
/usr/local/etc/but I can't find a folder of nginx.
If I check my website on https://builtwith.com I can't see Nginx also.
See yourself https://builtwith.com/keen.wtf
Does it mean I don't have Nginx installed?
-
@MJ most likely, yes. You could be using apache or something else instead, or possibly nothing. Did you set up the DNS records? It could also possibly just have NodeBB running on port 80 and use DNS records.
-
I did the nginx config and setup my DNS to forward www.gamingexodus.com to gamingexodus.com.
-
@julian said in in 1.5.0 entering www. gives error "Looks like your connection to [sitename] was lost, please wait while we try to reconnect.":
"socket.io": {
"origins": "http://domain.tld http://www.domain.tld:*"
}
...If I do this, I get this when I start up NodeBB
/root/nodebb/node_modules/nconf/lib/nconf/stores/file.js:160 throw new Error("Error parsing your configuration file: [" + this.file + ']: ' + ex.message); ^ Error: Error parsing your configuration file: [/root/nodebb/config.json]: Unexpected string at File.loadSync (/root/nodebb/node_modules/nconf/lib/nconf/stores/file.js:160:11) at Provider.add (/root/nodebb/node_modules/nconf/lib/nconf/provider.js:137:23) at Provider.file (/root/nodebb/node_modules/nconf/lib/nconf/provider.js:63:15) at Object.<anonymous> (/root/nodebb/loader.js:14:20) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:441:10) at startup (node.js:139:18)
-
I did make the file this
{ "url": "http://keen.wtf", "secret": "2f00fc31-fcaf-473b-bc14-1192d075e68a", "database": "mongo", "port": 80, "mongo": { "host": "127.0.0.1", "port": "27017", "username": "nodebb", "database": "nodebb" "socket.io": { "origins": "http://keen.wtf.tld:* http://www.keen.wtf.tld:*" } } }
-
@pichalite said in in 1.5.0 entering www. gives error "Looks like your connection to [sitename] was lost, please wait while we try to reconnect.":
@MJ remove the
.tld
.wtf
is yourtld
Done this after
./nodebb start
or./nodebb build
i get this
Starting NodeBB
"./nodebb stop" to stop the NodeBB server
"./nodebb log" to view server output
"./nodebb restart" to restart NodeBB/root/nodebb/node_modules/nconf/lib/nconf/stores/file.js:160
throw new Error("Error parsing your configuration file: [" + this.file + ']: ' + ex.message);
^Error: Error parsing your configuration file: [/root/nodebb/config.json]: Unexpected string
at File.loadSync (/root/nodebb/node_modules/nconf/lib/nconf/stores/file.js:160:11)
at Provider.add (/root/nodebb/node_modules/nconf/lib/nconf/provider.js:137:23)
at Provider.file (/root/nodebb/node_modules/nconf/lib/nconf/provider.js:63:15)
at Object.<anonymous> (/root/nodebb/loader.js:14:20)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18) -
@teh_g I have this
{ "url": "http://keen.wtf", "secret": "2f00fc31-fcaf-473b-bc14-1192d075e68a", "database": "mongo", "port": 80, "mongo": { "host": "127.0.0.1", "port": "27017", "username": "nodebb", "database": "nodebb" "socket.io": { "origins": "http://keen.wtf:* http://www.keen.wtf:*" } } }
-
@MJ you're missing a closing bracket for the mongo block
-
@PitaJ like this?
{ "url": "http://keen.wtf", "secret": "2f00fc31-fcaf-473b-bc14-1192d075e68a", "database": "mongo", "port": 80, "mongo": { "host": "127.0.0.1", "port": "27017", "username": "nodebb", "database": "nodebb" } "socket.io": { "origins": "http://keen.wtf:* http://www.keen.wtf:*" } }
-
it gives same error
/root/nodebb/node_modules/nconf/lib/nconf/stores/file.js:160 throw new Error("Error parsing your configuration file: [" + this.file + ']: ' + ex.message); ^ Error: Error parsing your configuration file: [/root/nodebb/config.json]: Unexpected string at File.loadSync (/root/nodebb/node_modules/nconf/lib/nconf/stores/file.js:160:11) at Provider.add (/root/nodebb/node_modules/nconf/lib/nconf/provider.js:137:23) at Provider.file (/root/nodebb/node_modules/nconf/lib/nconf/provider.js:63:15) at Object.<anonymous> (/root/nodebb/loader.js:14:20) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:441:10) at startup (node.js:139:18)
-
@MJ and you need a comma after the bracket. There are many many JSON validators and editors available through the internet. Use them, they'll make things easier.
-
@PitaJ said in in 1.5.0 entering www. gives error "Looks like your connection to [sitename] was lost, please wait while we try to reconnect.":
@MJ and you need a comma after the bracket. There are many many JSON validators and editors available through the internet. Use them, they'll make things easier.
I searched for It and I found one thank you sir
-
@julian said in in 1.5.0 entering www. gives error "Looks like your connection to [sitename] was lost, please wait while we try to reconnect.":
Alternatively... I suppose @MJ can put this in his
config.json
:{ ... "socket.io": { "origins": "http://domain.tld:* http://www.domain.tld:*" } ... }
I did this, but no success.
the site is still available if you go to http://1.keen.wtf
but does it something has to do with this problem?
https://community.nodebb.org/topic/10748here is dev log
https://community.nodebb.org/post/60646 -
in your case, put
http://1.keen.wtf http://keen.wtf
-
@PitaJ no I mean I want everything is dissabled and only http://keen.wtf is good. and other things are linked to http://keen.. like if a user goes to 1.keen.wtf it goes to http://keen.wtf or is this not possible?
-
@MJ yeah that has to done in nginx
server { server_name 1.keen.wtf; return 301 $scheme://example.com$request_uri; }