If you want to setup a VPS from Oracle Cloud first you can refer to that here
Install Nginx
Update packages and install Nginx:
sudo apt update
sudo apt install nginx -yStart and enable Nginx:
sudo systemctl start nginx
sudo systemctl enable nginxVerify Nginx is running:
sudo systemctl status nginx5. Configure Nginx for Your Site
Create a new Nginx configuration file:
sudo nano /etc/nginx/sites-available/noteAdd the following:
server {
listen 80;
server_name yourdomain.com www.yourdomain.com;
root /location/to/your/quartz/public/folder;
index index.html;
location / {
try_files $uri $uri.html $uri/ =404;
}
}Enable the site:
sudo ln -s /etc/nginx/sites-available/note /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
sudo systemctl restart nginxEnable HTTPS (Optional but Recommended)
Install Certbot:
sudo apt install certbot python3-certbot-nginx -yRun Certbot:
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.comVerify HTTPS by visiting:
https://yourdomain.com
Back References: