Hosting, specifically, web hosting is a very misunderstood and often overlooked industry of the internet. Too often people pay prices far in excess of what the actual service costs, while at the same time under-utilizing features provided by that very same price hike. This leads to expensive websites whose owners don’t have full control over the content being hosted. However, it is possible to completely go around web hosting companies while still remaining cheap and reliable. In this post, I will attempt to explain the different “tiers” of hosting and how to best utilize them.
Three tiers of hosting
There are three basic tiers we need to know about. These aren’t official by any capacity, but they are a good representation of what is available to the consumer in the industry. Listed in order of Highest Cost: Hosting Ability ratio.
-
Paneled/Sandbox hosting
- This is the type of hosting that often uses a management panel such as CPanel to administer content. This allows web admins to manage basic websites and databases. Shell access is often limited or even non-existent. Limiting backend scripts to whatever is on the panel at the time.
- This method of hosting is akin to a can of sardines. Generally, there will be thousands of low traffic websites on a single server with the panel separating and hosting their content dynamically. This causes both security and speed concerns. There have been cases in the past where database corruption lead to users being able to access other users content. Often a shared IP address is used and content fetched based on what domain requested it. This could lead to false associations between companies/parties. Imagine if “Anti-Abortion Inc.” and “Planned Parenthood” are found to be sharing a common IP. Same host, different people but on paper, it could look like they are both the same entity.
- Costs between: $5-$10/Month or $60-120/year
-
VPS hosting
- This is a subdivision of the 3rd tier “dedicated server” type hosting. It is able to also preform all the duties of a Paneled host.
- A VPS is a visualized instance of a physical server. All aspects of the software are open to the web admin and root access is generally given.
- As it acts as a stand-alone server, HTTP serving software such as apache2 or Lighttpd must be installed and configured to serve pages. PHP and MySQL are also generally needed for dynamic content generation.
- Two major types of container:
- OpenVZ
- Runs using portions of the hosts Linux subsystems. Can only run Linux distributions. Root access is still given and the container acts as a standalone system.
- Allows over-allocation of RAM (RAM is not reserved)
- KVM
- Runs under a host hypervisor.
- OpenVZ
- Can run many websites at once.
- Costs between: 1.5$-5$/Month or $15-$60 per year on the low end.
-
Dedicated Hosting
- This is a physical machine. All access is granted to the web admin.
- The other two tiers are slices of this.
Choosing a tier and host
VPS Hosting is the best choice if you are able to figure out the initial configuration. It’s much cheaper than Paneled hosting while at the same time giving much more space, features and resources. Dedicated Servers are not required unless serious traffic is being pushed. If you have to ask if you need one, you likely don’t.
Choosing a host is probably one of the most annoying tasks a web admin will deal with. There’s no central directory of reliable hosts. Many cheaper hosting companies end up closing 2-3 months later after barely offering a service at all. Because of the lack of central directory, its difficult to distinguish hosts like this, from reputable ones.
Communities such as http://lowendtalk.net offer a good view of what’s available and general opinions of companies. Unfortunately, new hosts reliability cannot be tested by anything other than time, so it suffers from a litter of hosts that look to operate well but are unsustainable in the long term.
A decent cheap host I have found is https://buyvm.net/. They have been stable for years and offer some of the most competitive small VPS pricing I can find. Their openVZ containers are $15.00/year and can run almost any small/medium sized website. I will be using them for this post.
Purchasing
Once deciding on a host and tier, you need to choose what configuration you want.
Generally, you will be offered two choices: OpenVZ, or KVM. OpenVZ is cheaper but lacks RAM reservation and hypervisor level emulation. KVM is more expensive but completely isolated with dedicated resources.
For this tutorial, I will be using an OpenVZ, $15 a year container. It contains 10GB of storage, a lot of bandwidth, and 128mb of ram. Considering on OpenVZ much of the system RAM is freed up as its running on the host outside the instance, this is actually quite usable.
Configuring a VPS Container to be used as a website host
Once you have your VPS purchased, it needs to be configured to support web traffic. This is done by installing a web server and related components.
For Debian based installations
Installing the Web Server (Apache2)
- Load up the container console via the host’s web interface, or SSH into it if you were given the login information on registration. It should display a screen that says root@(your hostname).
- Type: sudo apt-get install apache2 and enter your password when prompted.
- Once the installation is complete, navigate to your containers IP address (Listed on the host’s website). You should see a default apache page.
- Apache will serve the content located at /var/www/*
- If you just want to host static HTML/CSS Content, then you are done! Apache2 will run as a service on startup. Just place your content inside /var/www/
It’s as simple as that. Now the VPS will host the content indefinitely. In another post, I plan on outlining WordPress and MySQL for those that want their content to be a bit more dynamic. The VPS can also be used to host game servers such as Minecraft and Factorio.
At $15/year, this is an easy set and forget solution for a small website and a no-brainer for someone who has the time to set it up.