I am working in sample NodeJs application on ubuntu 14.04, now I need to deploy this sample application on to the server. For that I have used Nginx with PM2 for NodeJs. I have followed each and every step in the following URL - Setup NodeJs with Nginx and PM2 on Ubuntu to setup deployment.
Once all the setup completed and when I try to run my application, I am getting error as conflicting server name ignored
This are the version which I'm using for nodejs application. NodeJs Version - v8.10.0 NPM Version - 5.6.0 Express Version - 4.16.0
/etc/nginx/site-availables/default
server {
listen 80;
server_name ip_address;
location /test-app {
proxy_pass ip_address;
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;
}
}
Note: In location the /test-app is located in /root/test-app. Please let me know if I were wrong. Thanks in advance.