Some notes about technology I use, just so I don't forget.
Setting up an SSH key
First step is to create the key:
ssh-keygen -t ed25519 -C 'leoadonk@leoadonk.com' -f ~/.ssh/leoadonk
And then to use the key:
eval $(ssh-agent -s)
ssh-add ~/.ssh/leoadonk
Setting up an HTTPS server
Ingredients:
To set this up I just needed a virtual machine running Ubuntu. For each domain
I wanted to host, I'd point its DNS A record to the VM's IP and create a config
entry in /etc/nginx/sites-available/:
server{
listen 80;
listen [::]:80;
server_name leoadonk.com;
root /var/www/leoadonk_com/;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
Assuming I already had an index.html file in /var/www/leoadonk_com/, I'd
create a symbolic link in /etc/nginx/sites-enabled/ and reload nginx.
ln -s /etc/nginx/sites-available/leoadonk_com /etc/nginx/sites-enabled/
systemctl reload nginx`
At this point I would be able to see an HTML website at http://leoadonk.com.
To handle HTTPS, I'd install Certbot.
snap install --classic certbot
certbot
This would make the HTTPS version of the website available at https://leoadonk.com.