Nginx problem
-
NodeBB still works on "myadress.com:4567"
nginx -v = 1.12.2 status is runningsite is enabled
server { listen 80; server_name myadress.com; 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 http://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"; } }
{ "url": "http://myadress.com", "secret": "e179e05d-9cw8-45a0-89ae-b8d6bbfa19b8", "database": "mongo", "mongo": { "host": "127.0.0.1", "port": "27017", "username": "nodebb", "password": "pass123", "database": "nodebb", "uri": "" }, "type": "literal"
-
@evgeniy-onegin what problems are you actually having?
-
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.