Basic configure NGINX

sudo mkdir -p /var/www/beta1.pingkh.com/html

sudo chown -R $USER:$USER /var/www/beta1.pingkh.com/html

sudo chmod -R 755 /var/www/beta1.pingkh.com

vim /var/www/beta1.pingkh.com/html/index.html

<html>
    <head>
        <title>Welcome to beta1.pingkh.com!</title>
    </head>
    <body>
        <h1>Success!  The beta1.pingkh.com server block is working!</h1>
    </body>
</html>

sudo vim /etc/nginx/sites-available/beta1.pingkh.com

server {
        listen 80;
        listen [::]:80;

        root /var/www/beta1.pingkh.com/html;
        index index.html index.htm index.nginx-debian.html;

        server_name beta1.pingkh.com;

        location / {
                try_files $uri $uri/ =404;
        }
}

sudo ln -s /etc/nginx/sites-available/beta1.pingkh.com /etc/nginx/sites-enabled/