Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Problem running nodejs application with nginx

$
0
0
I am trying to run a hello world nodejs application on ubuntu with nginx, on localhost.
the application is running on port 3100.
nginx is running on port 82.
in the browser, it shows 403 error because it doesn't find the index.html file. i want it to redirect to the nodejs application but i don't know how.
I added this code to location / in the default nginx file
proxy_pass http://localhost:3100;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;

Any ideas?
thanks

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>