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
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