How to Self-host Static HTML website on Linux VPS [Full Steps]
This video shows how to self-host a static html website on an ubuntu linux vps, with nginx as the webserver. Also shows you how to setup https ssl certificate using certbot and dns cloudflare plugin.
In this video:
00:00 Intro
00:18 Previewing the site
01:47 Getting a VPS
02:59 Generating SSH Key Pair
06:03 SSH into the VPS
08:34 Adding sudo user
10:54 SSH as sudo user
11:24 Update and upgrade system
13:15 Installing Nginx
13:52 Creating the site directory in var/www/
14:56 Uploading Files with SCP
16:02 Creating Nginx site configuration file inside /etc/nginx/sites-available/
17:49 Enabling the site file by creating a symbolic link
20:01 Editing local hosts file for testing
20:45 Encountering an error…
21:09 Correcting the error
21:48 Site successfully hosted with HTTP
22:53 Setting up Nameservers with Cloudflare
24:03 Waiting for DNS Propagation
24:59 Domain active on Cloudflare
25:22 Getting an API token – for SSL dns-01 challenge
26:30 Installing Certbot
28:06 Installing certbot-dns-cloudflare plugin
29:06 Creating the API token file
30:58 Requesting the certificate
32:14 Request Failed!
33:23 Certificate obtained successfully
33:36 Add SSL certificate to Nginx configuration file
37:28 HTTPS working
37:53 Pointing domain name to server IP
39:02 Resetting the local hosts file
39:28 Outro
Website:
—————————————
Server provider:
DigitalOcean:
————————————————————-
Disclaimer:
This video is based on my personal experiences and knowledge. There is no guarantee that the information shared is 100% accurate.
Disclosure:
This video and its description may contain affiliate links, which can earn us commission if someone purchases products using those links.
[ad_2]
source