Node.js on nginx with different port -


i have seen few examples in internet tried none of them working, can tell whats wrong doing. have laravel app on nginx server , want run node.js app on different port on server. have been trying on different ways , getting "502 bad gateway"

another note, have https port allowed port 3000.

here's server config codes-

server{     listen 443 ssl; #   listen [::]:80 ipv6only=on;     server_name node.example.com;     root /home/tapos/node_modules;     index index.html index.htm index.js;     location / {     try_files $uri $uri/ =404; #   proxy_pass https://node.example.com;         proxy_pass https://localhost:3000;         proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;         proxy_set_header host $http_host;         proxy_set_header x-forwarded-proto $scheme;         proxy_buffering off;     } } 

you need add server block redirecting traffic nodejs app or update existing server block redirect traffic between nodejs application based on url.

please add updated server block or new server block question if need further help.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -