TECH: The hosting is in-house

Turning a 16-year-old laptop into a powerful web server. For free.

An old laptop has been given new life with open source software (Photo: M. Dean Smith)

(mykdeen.com) – After many hours of downloading, installing, configuring, reinstalling, tweaking, and cussing, this website is now hosted entirely in-house.

Literally in my house.

A salvaged laptop from 2001 and open source software is powering this website. Debian 8.7.1 running a WordPress server via Apache. I hope to soon have Radio Mykdeen back up and running through the dedicated Icecast server, as well.

The idea of having a dedicated web server isn’t a new one, but this is the first time I’ve actually attempted it. This is also the first time I’ve ever installed an operating system without a desktop environment–needless to say, it’s also the first time I’ve knowingly used SSH to remotely access a server.

The process wasn’t entirely foreign, however, considering this particular Sony Vaio had been running Debian 7 for the better part of three years–first as a network bridge while I bootlegged internet, then as an Icecast audio server for the first iteration of this website. It was originally purchased 16 years ago and given to me once it was already outdated. This Vaio once ran Microsoft Flight Simulator 98 quite well, but I have a perfectly good gaming computer now. It has proven to be a rock-solid 1 GHz AMD processor and 256 MB of memory, but the battery hasn’t held a charge in at least a decade. A server seems like the way to go.

Till Brehm wrote a detailed description of installing Debian 8 as a server. The tutorial also has lots of screen shots of the process.

I found this helpful article from HowToForge to get me started. The net install worked flawlessly,
and a quick download of PuTTY let me get off of my feet (I’ve been standing in a closet this whole time) and into a big office chair for the next few hours. With the computer now tucked away on a dresser, I headed upstairs to begin the fun stuff. About 10 minutes passed when the first hiccup happened.

Did the laptop downstairs just freeze?

Nope. It went to sleep. Somehow, power save functions persisted even after a clean install. I knew this would be a problem considering a server needs to stay on all the time. Without a GUI to let me turn it off, I found information from Debian that easily solved the problem.

Brian Datt at LinuxServe.com wrote this tutorial that included a how-to on database setup, an important feature that makes WordPress a powerful content manager.

I was finally able to prepare the system to truly be a WordPress server. Linux Serve had a straightforward way to ensure all of the proper dependencies are met. I was able to easily get previous versions of blogs imported, but was not using my domain to set up WordPress. Once things were working well enough by pointing a browser at the server’s internal and external IP addresses, it was time to quickly get my domain pointed at a number.

“Quickly” didn’t happen.

You see, the Apache server sets the root of the World Wide Web domain to the folder “/var/www/html” by default. The way Linux Serve suggested I install WordPress, however, created the site in “/var/www/html/wordpress” or “123.45.678.90/wordpress.” My domain provider tells me that a domain cannot point to a subdirectory.

Crap.

Two keystrokes was the difference between seeing two items in a folder and three items in the same folder. The file “.htaccess” is necessary in a self-hosted WordPress website.

It took about two hours of searching and two different sites, but Stackoverflow helped me figure out how to see what I was doing, and Xmodulo helped me figure out what to change. Once the .htaccess was set properly, information straight from wordpress.org was exactly what got the domain pointed at the proper section of my server.

Now it’s a matter of getting the layout perfected.

This site may not be much, but it’s mine.

-MDS