Welcome! Log In Create A New Profile

Advanced

Problem running nodejs application with nginx

Posted by mariem_11 
Problem running nodejs application with nginx
July 16, 2019 06:17AM
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
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 118
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready