One of the big advantages of a VPS is hosting multiple sites on a single server. Nginx makes this easy with server blocks (virtual hosts).
One file per site
Create a separate config in sites-available/ for each domain, each with its own server_name and root:
# /etc/nginx/sites-available/site1.com
server {
listen 80;
server_name site1.com www.site1.com;
root /var/www/site1.com;
index index.html;
}
Repeat for site2.com with its own root directory.
Enable them
sudo ln -s /etc/nginx/sites-available/site1.com /etc/nginx/sites-enabled/
sudo ln -s /etc/nginx/sites-available/site2.com /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
Add HTTPS to each
sudo certbot --nginx -d site1.com -d site2.com
Nginx routes each request to the right site based on the domain. With dedicated resources on a OneHost VPS, you can comfortably host many sites on one server.