something.com

So I was looking at how I could improve my blog a little, given the recent traffic spikes, and that maybe there was a case for some added functionalities to better serve my audience. The problem is, when on a free hosted provider such as wordpress.com, the set of configurable features, from CSS to php, are fairly limited. The upside of a free services provider, however, is that their servers usually looks after all the little niggly techie aspects, such as web infrastructure, settings and the like. So, in order to find a middle ground, I thought, why not try and replicate the features across and see how I can build on-top of that.

This How-To is a bit different from my other blog posts in that it deals primary with technical web aspects. So no economic commentary, market analysis or so forth, more of a little technical white paper to cover the needs of Mac OS X users. As the rest of this post will highlight, the focus is on the Mac OS X darwin environment. Following some personal research, I found very limited open source documentation for this specific platform and hope that this little blog entry could fill the gap a little. Please note that some of the entries are based on basic POSIX knowledge and familiarity with ordinary BASH command prompts.
Given this little background on my environment and needs, I’ve opted for the following solution:

A Self Hosted Server

Back in the good old days, when dialup modems were the norm, and web-browsers would crank up pages one slow interlaced image at a time, hosting your own server was a definite no-no. There were a few practical aspects that simply made the exercise quite impossible. Primo, your connection was too slow over a modem to even serve your emails quickly let alone try and serve out websites. Secondly, your IP address would refresh and change every time you connected, kind of like getting a temporary pass on the internet, nobody really knew when you were there or when you weren’t. And finally, your computer had trouble loading word processing tasks, let alone trying to manage a server load on its back-end while keeping your user experience up to speed.

Flash-forward a decade and a half or so and we have the following scenario: my printer and my modem now serve their own dynamic webpages accessible over wireless internet connections throughout my personal network. Not only do these two consumer appliances actually have more raw-power and speed than my good old clunkering desktop, they’re also smart: delivering live database feeds, CGI produced images (that’s common gateway interface) producing live graphics on an always-on and user id access controlled web layer. As if to rub in the fact that these two blocks of plastic and semiconductors are better than my old beloved pc, they offer their connectivity interfaces out of the box, literally, just switch on and they’re ready to go. So if these two consumer appliances can do it, why can’t I? Well, as the opening paragraph noted, it is less a question of why and more a question of: is it worth it?

The benefits of hosting your own service is debatable but there are certain customisable aspects that can only be gained through a integrated and controlled system layer. These layers are easily available by dedicated providers, however, for a complete level of control a certain price needs to be set. The good news is that these providers are substantially cheaper these days than they were a few years ago. However, given that excess capacity is available from your own desktop, then why not take advantage of it?

To highlight this, it is worth looking at what our online, always-on, souped up ‘I can play 3 HD movies at once’ connections offer us. In truth, they offer us the potential for an unprecedented level of access and interoperability with the world, across medias that were simply unavailable in the last century. Think YouTube, think facebook, think the multi-system integrated HTML5 music promo for the The Wilderness Downtown and you start to see what is available out there when high level systems engineering combined with creative and insightful design can really deliver you. But what about a blog such as this one? Well, to make a short answer available, yes, it can be hosted and yes, it can even be cost effective.

Starting off with the basics, let’s talk server software here, web server technology has leaped through bounds and barriers continually optimising both its processing speed and efficiency. Many a private technology provider have tried to deliver the latest and best in this area but, surprisingly so, the crown for the fastest and still most reliable package out there remains in the open software domain. I’m talking here about Apache, a software package developed by the core engineers that delivered the basic nuts and bolts of our integrated networks, and a package that is freely available for anyone willing to go for a bit of an install heave. Apache, often visible within the process lists of most servers as the httpd background daemon, is not a retail platform, it’s not even mid-level platform, no Apache deserves the full depth of its relevant commercial categorisation as Enterprise software. But, and this is an important but, it still remains one of the most efficient and versatile enterprise layers out there. Its configuration depth allows it to manage behemoth websites but also allows ultra-slimmed thin layer applications. The primary reason for this level of customisation comes from its delivery format.

Apache is usually delivered at a source file level, which is another way of saying “it needs to be compiled, so good luck…”. Again, please don’t let this scare you. As a matter of fact, one can obtain basic binary installations, a simple double click install workflow, for most mainstream environments,

so even this concern can be allayed these days. However, it is the actual configurable layer that I will try and tackle today – so be ready for some basic install commands to come through shortly.

Under Mac OS X and other variants, the basics of the installation follows the unix command structure. It is worth noting that Apache comes delivered with most Mac OS X installations, at which point it is only a question of going into the preference panel and clicking on the personal web share activation. However, this default installation lacks some of the configuration choices that you might need if you want some basic rewrite functionalities and sub-folder controls that are configured via a .htaccess file.

In order to get this configurable installation, the following steps are required

    Download the latest Apache package: Apache
    Download the latest PHP package: PHP
    Download the latest MySQL package: MySQL

Once these are downloaded, simply install the Apache package first by extracting the tar file and running the following command from your terminal prompt:

    sudo ./configure –prefix=/usr/local/apache2 \
    –enable-rewrite \
    –enable-headers \
    –enable-expires \

The sudo command essentially puts you as a superuser for the installation process and should prompt you for your administrator password. The other –enable- build options include a few core packages on-top of the default ones to the Apache server compile. These can also be built separately as Dynamically Structured Objects (DSOs, more about these over here) but to keep the thin client as light and quick as possible I’ve decided to build them right into the binary. Finally, the –prefix= sets the installation location where your application is being installed to. Continue to Part 2

Comments are closed.

Disclaimer: Material posted on 24-something does not contain (and should not be construed as containing) personal financial or investment advice or other recommendations. The information provided does not take into account your particular investment objectives, financial situation or investment needs. You should assess whether the information provided is appropriate to your particular investment objectives, financial situation and investment needs. You should do this before making an investment decision based on the material above. You can either make this assessment yourself or seek the assistance of an independent financial advisor. 24-Something, associated parties and Tariq Scherer accept no responsibility for any use that may be made of these comments and for any consequences that result.