In this guide I tell you how to install NGINX on your Linux based machine and how to serve the entire website all locally on your own network using hardware you control (Or you can make it public but you need a domain and a SSL cert)

Requirements

  • Basic Linux knowledge.
  • A Linux server (Ex. Old laptop or even a RasberryPi) or Linux VM/LXC (Ex. Proxmox, VMware, or basically any Linux VPS like Hetzner, DigitalOcean, AWS).
    • Preferably running a Debian based distribution (If your using another one some commands may be different but you should be able to figure it out)

Guide

Install NGINX

Hosting

Faq

I wrote this part assuming your using a Debian based distribution. If your using another you may need to change some commands (depending on your service manager service may be systemctl for example if your using systemd), install git, or replace /var/www with whatever folder you want.

Clone the repository containing the site backup inside of /var/www.

cd /var/www
git clone https://git.slavserver.com/DooSkagg/SlavinskyCookbook-Backup.git .

Find your nginx default config by running this command:

find / 2>/dev/null -wholename '*/nginx/sites-enabled/default'

Open it using vim or nano (or any other text editor) delete all lines inside of the default config and paste the following in:

server {
    listen 80;
    server_name example.com;
    root /var/www;
    index index.html;
    error_page 404 /404.html;
 
    location / {
        try_files $uri $uri.html $uri/ =404;
    }
}

change the example.com in line 3 to either the domain your going to host it on or the local IP of your server.

Restart NGINX (May be different command depending on your Linux distro)

service nginx restart

Access your site at http://[IP_OF_SERVER]:80 For HTTPS support this guide should help you