I’ve deployed my app and installed nginx in my server
and added following configuration to /etc/nginx/conf.d/app.conf
server {
server_name www.app.com;
return 301 $scheme://app.com$request_uri;
}
server {
listen 80;
server_name app.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
After this I restarted the nginx server
sudo service nginx restart
returned ok status but I’m getting 502 bad gateway error
what is missing in my configuration, If I stop the nginx server normal app deployed by mup is working fine