Created: 2024-03-06
Updated: 2024-03-11
nginx Routes: /var/www/html/* /etc/ssl/* /etc/nginx/site-available /etc/nginx/site-enabled nginx config block:
server {
listen 80;
listen [::]:80;
root /var/www/your_domain/html;
index index.html index.htm index.nginx-debian.html;
server_name your_domain www.your_domain;
location / {
try_files $uri $uri/ =404;
}
}
Enable the site config:
sudo ln -s /etc/nginx/sites-available/your_domain /etc/nginx/sites-enabled/
Test and restart nginx:
sudo nginx -t
sudo systemctl restart nginx
Build and host app:
pm2 serve build 8080 --spa --name html-gamebox