server { listen 80; server_name blnews.com www.blnews.com;
#Configures the publicly served root directory
#Configures the index file to be served
root /var/www/proyectos/mybl-news-backend;
index index.html index.htm;
#These lines create a bypass for certain pathnames
#www.example.com/test.js is now routed to port 3000
#instead of port 80
location / {
proxy_pass http://localhost:3000;
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;
}
}