How did we get here?

It seems fitting, that the very first post should summarize all of the steps taken over the past few months to get us to this point. You are currently viewing this webpage, served off a junk HP mini-desktop computer, repurposed as a web host. The idea was to get a presence online as cheaply as possible, to learn a little, and to have some fun along the way. While we are in no way complete, and frankly we may never be, we are at a point where we can look back and reflect on this minor accomplishment. I wanted to make this post as detailed as possible, but at the same time, careful not to inadvertently reveal some vulnerability in my setup.

Procedure

Install Ubuntu (ubuntu.com)

The preference to work with Linux, and a distribution like Ubuntu was based on past experience, the stability of the operating system, and the availability of support and online assistance.

Install Apache Web Server (Apache2) and MySQL

Both of these are necessary applications to get the site built and operational. A browser pointing to http://localhost will verify Apache, while you can test the MySQL installation using the command line, or a client such as MySQL Workbench.

Register a domain name

The domain name was registered with Google Domains (now Squarespace). With residential local hosting, DNS will need to be dynamic, and updated when the external IP address changes. This is described below.

Cloudflare (DNS)

Services from Cloudflare, provide a script to use on a local machine, running periodically to catch an update of the external IP address. When this occurs, the new IP is used by Cloudflare to update the DNS A record for the site. Create both an A and a CNAME (www) record, to allow both domain.com and www.domain.com to work. An MX record will be required for your email host, who will provide instructions for the configuration.

TLS Certificates

Create and configure SSL/TLS Certificates using LetsEncrypt and Certbot, to enable secure (https) traffic to and from the site. Certs are free and include automated processes to renew, before expiration.

Install WordPress

There are several dependencies and issues may arise if any are skipped/missed. The configuration includes connecting WordPress to the MySQL database and using the Apache webserver to log in to the admin console.

Endnote

The Apache configuration is a bit tricky, with the virtual host files, overrides, apache2.conf, and .htaccess files muddying up the water and increasing the difficulty in determining the route of an incoming connection. But… it works!


Posted

in

by

Tags: