Add a new server block
1
sudo vim /etc/nginx/sites-enabled/yourdomain.com
Add the following content
1
2
3
4
5
6
7
8
9
10
server {
listen 80;
listen [::]:80
server_name yourdomain.com; # or _ if you want to listen to all domains
location / {
proxy_pass http://localhost:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
}
}