Nginx configuration location:

/etc/nginx/conf.d/

 

Nginx template

server {
 location / {
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   Host      $http_host;
        proxy_pass http://localhost:1234;
      }
 }
 server {
 server_name subdomain.domainname.com;
 location / {
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   Host      $http_host;
        proxy_pass http://localhost:4321;
      }
 }