Follow this steps to configure Nginx.

  1. Create directory in /var/www called xyz.com
  2. Copy static files in that folder. e.g index.html
  3. cd into /etc/nginx/ (nginx configuration files)
  4. Create file called xyz.com in sites-available directory.
  5. Add following text to it
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/xyz.com;
index index.html;
server_name your_site.com www.your_site.com;
location / {
try_files $uri $uri/ =404;
}
}

6. Add this file to the sites-enabled folder

ln -s /etc/nginx/sites-available/xyz.com /etc/nginx/sites-enabled/xyz.com

7. sudo systemctl restart nginx