Nginx problem
-
now
2018-04-01T16:33:24.241Z [2048] - [31merror[39m: MongoError: failed to connect to server [127.0.0.1:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
probably after nginx
-
hmm, i forgot to start MongoDB. Now it's work but on 4567. I'll try nginx again.
upd: NodeBB still work on 4567 port
-
Lmao, nodebb doesn't want on another port. Other than nginx, need something else?
-
@floufille I don't understand you.
-
@floufille I want to install a proxy through nginx. I install nginx and configured it as in the documentation. As a result, nothing works, the site is still only available on the 4567 port.
-
Do you have an error code when you are trying to go to the site ?
Did you see nginx listening the http port ?
root@server:/data# lsof -i | grep http | grep nginx
nginx 4875 root 6u IPv4 19098987 0t0 TCP *:https (LISTEN)
nginx 4875 root 7u IPv4 19098988 0t0 TCP :http (LISTEN)
nginx 4875 root 8u IPv6 19098989 0t0 TCP *:https (LISTEN)Did you restart nginx ?
-
@evgeniy-onegin did you reload nginx after making changes to your configs? Where is the nginx config file you created located? What platform are you on? What tutorial or documentation did you use for the nginx setup?
-
@pitaj
https://docs.nodebb.org/configuring/proxies/nginx/
I'm always restarting nginx. Main nginx config in /etc/nginx/ . I'm on Ubuntu 16.04. -
And why i can't create new topic? Just no effect when i click on "new topic"
-
wtf guys :C
-
@evgeniy-onegin can you screenshot what happens when you visit at port 80?
-
@evgeniy-onegin is this on 4567 or port 80?
-
@evgeniy-onegin said in Nginx problem:
@pitaj 4567. When i try to connect without 4567 port in address bar browser return - ERR_CONNECTION_REFUSED:
In the browser console? It's because socket.io restricts the origin to only port 80. You can bypass it with
./nodebb stop && ./nodebb dev
for testing purposes. -
In the browser console? - No, just error page.
-
@evgeniy-onegin please, take screenshots.
-
@PitaJ @floufille Lmao guys, the problem was in the browser... For some reason he did not let me to site. >< (Yandex browser)
-
I suspect nginx is not started, or not bind the http port.
What did you see in : /var/log/nginx/error.log and /var/log/nginx/access.log
when you try to restart nginx and when you try to access to the siteDo you have a firewall which can block the http port ?
Do you see the http port binded by nginx with lsof command ?
Do you see nginx started with ps command ?