hk9
By:
hk9

Using Nginx to host multiple Node.js applications, i followed this tutorial https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-14-04 but can't host the second application

May 14, 2015 1.8k views
Nginx Node.js DigitalOcean

server {
listen 80;

server_name greatwallprojects.com;

location / {
    proxy_pass http://127.0.0.1:8080;
    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;
}

location /pingtest/  {
        proxy_pass http://127.0.0.1:8081;
        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;
    }
}

The second application pingtest is not displayed. My application folders lie in home/user/

You can check the problem by visiting http://greatwallprojects.com/pingtest/ a blank page is displayed.

Be the first one to answer this question.