Skip to content

Latest commit

 

History

History
68 lines (46 loc) · 1.09 KB

README.md

File metadata and controls

68 lines (46 loc) · 1.09 KB

This is my webside :)

Bare git, pure C, No Javascript

Instructions

Install dependencies

sudo apt install build-essential cmake git certbot python3-certbot-nginx

Build the server

mkdir build
cd build
cmake ..
cmake --build .

Export your domain

### Replace with your domain
export YOUR_DOMAIN=blog.alfie.news

Run the server / Enable systemd service

cp cwww.service /etc/systemd/system/cwww.service
systemctl daemon-reload
systemctl enable cwww.service
sudo systemctl start cwww.service

ngnix config && certbot (TLS)

cp ngnix.conf /etc/nginx/sites-available/$(YOUR_DOMAIN)
ln -s /etc/nginx/sites-available/$(YOUR_DOMAIN) /etc/nginx/sites-enabled/$(YOUR_DOMAIN)

ngnix -t

cloudflare

Get IP from host, then add an A record to cloudflare with the IP

Enable

systemctl reload nginx

certbot --nginx -d $(YOUR_DOMAIN)

RENEWAL of certificates:

certbot renew --dry-run
certbot renew

Check

If it all goes well, you should be able to access the site via https://$(YOUR_DOMAIN)