@PitaJ said in Moving from NodeJS to Nginx:
@Thouv you run NodeBB on a different port, and proxy that through nginx onto port 80. We recommend doing this even if you are only running NodeBB. Check out the example nginx configs in your docs.
I wrote exactly what was written on there, with NodeBB running on 4567. When I start NodeBB, everything is fine, and there are no errors in the log. However, when I try to access my forums, I get a 502 Bad Gateway and this shows up in the log:
18/4 19:52:35 [8293] - error: TypeError: Cannot read property 'loggedIn' of
undefined
at helpers.displayMenuItem (/opt/nodebb/public/src/modules/helpers.js:20:44)
events.js:160
throw er; // Unhandled 'error' event
^
Error: write after end
at writeAfterEnd (_stream_writable.js:193:12)
at LogStream.Writable.write (_stream_writable.js:244:5)
at Socket.ondata (_stream_readable.js:555:20)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:551:20)`