Blogging 101

Welcome to Blogging 101. Have you ever wanted to have an online blog so that you can spout off about your inner demons, or maybe just share a few photos and ideas, but were disillusioned by the complexity of applications like or the expense of ? If so, then I've got you covered. In this article, I'll describe in detail how to obtain a FREE web hosting service, configure it, build a sample blog and then deploy it, all in just a few steps, and without having to know how to write code or run a web server.

If you already have your own hosting service and are not looking to change, but came here for details how to build and deploy your blog, jump to Build Your First Blog section below.

Obtaining a Hosting Service

The first thing you will need to get started is a web hosting service to host your blog. There are a lot of options out there, but most charge annual fees, and of those that are free, only HelioHost is easily configured. Follow the link to sign up for an account.

"Free signups open on the Johnny server at midnight and noon UTC, and usually fill pretty fast. Tommy has just finished being rebuilt, and is blazing fast for all of our donors. If you don't want to wait for free signups to open, you can get an account on Tommy immediately for as little as $1. Morty is also getting closer to being released. If you need help deciding which plan to go with don't hesitate to ask using the Discord chat icon in the bottom right corner. We look forward to having you join the HelioHost community."

If there are no free slots available, you can pay a flat fee of $1.00 (US) to join the Tommy server, which gives you 6 GB of storage. Johnny limits you to 1 GB. I recommend coughing up the dollar.

Techinal stuff: HelioHost works nearly identical to GoDaddy, Bluehost and other popular hosting services, but unlike other free hosting services like InfinityFree, it includes seamless SSL certificates, which if you've never had to manage these yourself, consider yourself lucky. HelioHost also uses Plesk as a CPanel replacement, which is extremely easy to use. They also have an embedded Discord server that allows you to ask questions of the admins, and they are remarkably responsive and helpful. I have on several occasions needed help in setting up special services such as adding a subdomain or domain alias and they went ahead and did it for me. For the purposes of setting up your blog though, you shouldn't need this extra help.

Once you've created an account, sign-in and select the big Plesk button located on the Dashboard. This will take you to the Websites & Domains page (shown below). If your domain is not already expanded, click the down arrow next to your domain name (e.g. nnnn.heliohost.us), where nnnn is probably your username, however, some users have domain names that look quite different. Your domain name will be needed in your blog configuration later, so write it down.

Heliohost Websites & Domains
Heliohost Websites & Domains

Configure Your Server

To configure HelioHost, you will need to enable SSL certificates and set your log rotation. On the Websites & Domains page, select SSL/TLS Certificates under Security on the Dashboard tab, and set your configuration options to match those shown below, then click the back button on your browser to return to the Websites & Domain page.

Heliohost SSL/TLS Certificates
Heliohost SSL/TLS Certificates

Next select the Hosting & DNS tab and click on the Hosting button. Set your SSL/TLS Support settings to match those shown below, and save it. Click the back button on your browser to return to the Websites & Domain page.

Heliohost Hosting & DNS
Heliohost Hosting & DNS
Heliohost Hosting Settings
Heliohost Hosting Settings

Next, select Logs under Dev Tools and click the Log Rotation button at the top of the page. Once you've set your log rotation, click OK to save it.

If you do not setup log rotation, the server logs will eventually grow so large that they use up all of your alloted hard disk space at which point the admins will take your website offline and you'll need to work with them to restore it.
Heliohost Log Rotation
Heliohost Log Rotation

Now choose the Files option from the menu on the left. You should see a screen that looks something like the one shown below. At this point you web server is configured. Go ahead and pat yourself on the back.

Heliohost File Directory
Heliohost File Directory

Build Your First Blog

The first step in creating your blog is to download . Once you've downloaded the distribution ZIP file, extract it into any folder of your choice. It will copy its files into a subfolder ( slimlines ) — it has no install process. You can move subfolder without affecting operation. To uninstall, simply delete the subfolder. Slimlines runs on both Windows and Mac OS. It is a Windows x64 console application, but can run on a Mac in a BootCamp partition (or so I've been told).

Once extracted, open the build configuration file ( /slimlines/build.xml ) with any text editor and update the <SiteTitle> and <SiteDescription>.

  <Setup>
    <SiteTitle>       Bob Biggs Blog                        </SiteTitle>
    <SiteDescription> Bob Biggs takes to task timely topics </SiteDescription>
  </Setup>

Next, run the build file ( /slimlines/build-html.bat ) to build your blog in HTML. Your blog will be built using the a basic configuration. Later you can look through the documentation at the available configuration options, but for now let's keep this as simple as possible. Your HTML files will be saved into the ouptut folder ( /slimlines/html ). If the folder does not already exist, Slimlines will ask your permission to create it. When the build is complete, you can double-click the build.html file to load your blog into your default browser to review it.

Build Your Database

The next step is to build your blog as a database for deployment on your web server. To do this, you will need to open the database configuration file ( /slimlines/db.xml ) with any text editor and set the $HOST_NAME$ to the web server's domain name (see above). You will then need to set the $SUBFOLDER$ to the subfolder where you want your blog to reside.

  <Placeholders>	
    <Placeholder> <Name> $HOST_NAME$     </Name> <Content> bobbiggs.heliohost.us </Content> </Placeholder>
    <Placeholder> <Name> $SUBFOLDER$     </Name> <Content> blog                  </Content> </Placeholder>
  </Placeholders>

Now that you've set your placeholders for building a database, you can run the database build file ( /slimlines/build-db.bat ) to build it. Slimlines will save your database and its support files into the subfolder you specified ( i.e. /slimlines/blog ). If the folder does not already exist, Slimlines will ask your permission to create it. Your database is now built and ready to deploy.

Deploying Your Database

The next step is to copy your files to the web server. Select the public_html folder in the Home Directory of your server's file system, and drag and drop the entire output folder ( i.e. /slimlines/blog ) into it.

Once that is done, the folder structure on your server should look like the following:

/home/bobbiggs.heliohost.us
    /public_html
        /blog
            .htaccess
            includes.php
            blog.sqlite
            pdodriver.php
            router.php
            /plugins
A note on the support files: Slimlines requires several support files for deployment. Virtually every website on the Internet does something similar, so it's worthwhile to provide a brief explanation on what they are used for and how they work. The first support file is the HTACCESS file ( .htaccess ). This file is always the first file loaded when you access a URL on the Internet. The purpose of this file is to route your request to the appropriate handler, in this case the ROUTER ( router.php ). I've added additional code to HTACCESS to prevent visitors from accessing and downloading certain types of files, such as your database file, configuration files and directory-level error logs, or from reading your server's directories directly. It also forces the use of https and removes www. from the start of all URLs. The INCLUDES file ( includes.php ) is generated by Slimlines and its sole purpose is to store the path to your database file ( blog.sqlite ) for use by the ROUTER. The PDODRIVER file ( pdodriver.php ) includes the functions needed by the ROUTER to read data from your database. It also includes some utility functions, such as writing to your visitor log. Finally the ROUTER does the remainder of the housekeeping. It parses the URL request and reads the page elements from your database, assembles them into a coherent page and then presents the page to the requesting browser. Some of its other roles are handling user authentication, page decompression, logging visitors and displaying alerts. It should not be necessary to modify any of these files.

That's it, you are done. You can access your blog online via your domain ( https://bobbiggs.heliohost.us/blog ).

Cleanup

If you have or will be obtaining a personal domain name, such as bobbiggs.com, you will need to update your Domain Name Service to have it point to HelioHost's name servers, ns1.heliohost.org and ns2.heliohost.org, and you will need to setup a domain alias. Heliohost does not yet expose this option to its users, so you will need to use the Discord chat (purple button, lower right) to request that the admins do this for you. If you do not have your own personal domain name and would like to obtain one, I can recommend Namecheap. I use them for all my DNS services and they are indeed cheap, costing about $17/year per domain name. You can also transfer existing domains to their service. New users are often offered steep discounts. Once you have a domain name, you will need to edit your configuration file to add the <Domain> placeholder, rebuild and redeploy (see Updating Your Blog below).

  <Setup>	
    <Domain> https://bobbiggs.com/$SUBFOLDER$ </Domain>
  </Setup>

Updating Your Blog

Updating your blog is now as easy as modifying your configuration file, rerunning your database build file and then recopying the output folder onto your server's public_html folder.

Comments