Hi All,

I referred this tutorial -> [https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04]
and created node js (app.js) and it works with Nginx reverse proxy @ api.iotboxapp.com/app1 & api.iotboxapp.com/app2
but when i use express app in node js , Nginx is not working , but locally its working
please help me
i have attached screen shots for reference here [https://drive.google.com/open?id=0B0um3JuXEgglcE9mcE83MXlrZGM]


http.createServer(function (req, res) {
res.writeHead(200, {‘Content-Type’: 'text/plain’});
res.end('Hello World\n’);
}).listen(8080, 'localhost’);
console.log('Server running at http://localhost:8080/’);

not works:


res.send('Hello World3!');


console.log('Running on port 8090…’);

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Issue resolved by using same api path in nginx default configuration


res.send(‘Hello World3!’);


location /app3 {

thanks all