Web Hosting



 

In the current generation of growing technology, everyone has the need to advertise themselves or their business in the most efficient way. To target a bigger audience at a fast and cheaper price, people have embraced the need of having a website. A website is a collection of related pages stored in a location and that can be accessed through the internet. The storage of these websites to allow for its access to the internet is what is referred to as web hosting. A web host is a machine that stores the website files. It should always be on and connected to the internet. There are different ways in which websites can be hosted and we are going to look at them in the main section.  

Body  

After creating an astonishing website, it is time to decide how it is going to be available to your target audience, time to think of web hosting solution. There are different ways of hosting a website and include:  

1. Web Host Service Providers

These are companies that will provide the technology and services needed by a certain website in order to be accessed through the internet. These companies have special computers called servers which store all websites files. There are different web host service providers and include Amazon Web Services, Google Cloud Services, Bluehost and GoDaddy. Different companies have different packages which will differ with prices. The different packages that one can choose from include:  

i. Shared Hosting

This is where a website is being stored in the same servers as other websites. All websites on this server will tend to share all the resources like the processor and RAM. This is a package suitable for small businesses and it is comparatively low in price. Since it involves sharing, usage can affect the user experience on all websites.

ii. Dedicated Server Hosting

Here your website is stored in its own server. This package provides the user with full admin and root access which means all features of the security and type of operating system are under his control. Look at it as being given your own computer, but it is in a different location. It is relatively expensive and more secure than the previous package.  

iii. Virtual Private Server Hosting

This is the same as shared hosting where websites are on the same server, but the difference is that the user is given more control over the server. It basically mimics the dedicated server but cheaper.

iv. Managed Hosting

This is a package for users who need a website, but do not have any technical skills to set up or develop a website. Companies like WordPress which will offer this kind of package are responsible for the entire hardware and software configuration. This is the cheapest kind of package.   Before choosing the right package, one needs to consider factors like:

 

- The security of the website files

- The speed of access

- The space required

 

After considering the factors, you will need to buy a hosting package and a domain name. The domain name is what will differentiate the websites and can be accessed with a user by typing it in the web browser.

2. Self Hosting

This is a kind of service that will allow the developer of a website to use a home computer which will act as a server. If you are interested in web hosting as an area of specialization, self-hosting is one entertaining way to learn. Hosting a website on a local desktop environment will require one to have a basic understanding of running a website on a local host.  

Setting Up

Hosting can be done both on Windows or Linux operating systems by first installing the AMP stack, which is an application server that will allow files to be run on the local host. The AMP stack, which is available on Windows as WAMP and LAMP on Linux, stands for Apache, MySQL, and PHP.

Hosting on Windows

A directory, normally in the C:\wamp\www is automatically created after installing the WAMP stack and it is where websites will reside. A control panel to start Apache and MySQL as services is also provided. To make websites available to the local host, you need to start both the services and type in http://localhost in your web browser to see if it is working properly. A welcome page is displayed if the server was started successfully.  If your website has the main page as index php and is stored in the www directory, you access it by typing http://localhost/index.php in the browser.

Going Live

To make your website available to the internet, the following steps have to be followed:  

a.) Allow incoming connections

The configuration set by Apache only allows your local machine to access websites. These configurations has to be changed and below are the steps involved:  

 

- On the WAMP control panel click on Apache and then httpd-vhosts.conf which will present a configuration file having the following lines of code:

 

# Virtual Hosts

#

<VirtualHost*:80>  

ServerName localhost

ServerAlias localhost

DocumentRoot “C:\wamp\www”

Options + Indexes + Includes + FollowSymLinks + MultiViews  

AllowOverride All  

Require local

</Directory>

</VirtualHost>

 

Restart all the services after changing the line Require local to Require all granted to allow for incoming connections.

b.) Adding a domain name

- Every website on the internet has a domain name. This domain name points to a certain IP address and every computer must have a unique IP address. Having your IP address and domain name in the DNS records, you now have to update your local host file.

 

- To the bottom of the file named hosts located at C:\Windows\System32\drivers\etc\ add the line   199.000.000.01 mywebsite.com where 199.000.000.01 is your IP address and mywebsite.com is your domain.

 

- You later create a file manually in the location

 

C:\wamp\bin\apache\Apache-VERSION\conf\extra\ and include the following lines of code :  

ServerAdmin admin@mywebsite.com

DocumentRoot C:\wamp\www

ServerName mywebsite.local

ErrorLog “logs/mywebsite.com.log”

CustomLog logs/mywebsite.com-access.log common

 

After that save the file and voila, your website is now available on the internet via that domain name. All you now have to do is make sure your computer never goes off and that it is always connected to the internet. For best results, consider using the Windows Server OS. The same can be done with the Linux operating system.

 

Advantages of Self-Hosting  

- The main advantage that this kind of hosting offers is the freedom to do whatever you want with the website and server.

- Ability to learn how to configure your own files and since your files reside in your local machine, it makes it easy to manage and maintain your website  

Disadvantages

- It is expensive as a lot of electricity and internet is needed.

- Your website is prone to slow speed of access which will affect its search engine rank.

 

There are alternatives to choose from when it comes to hosting a website as we have seen. Most web hosting companies are advancing on their technology and so does the PC manufacturing firms. This will mean more powerful computers that can act as servers.

 

Although the hosting of a website on your own can be expensive and time-consuming, it is worth, especially to those people who wish to learn and understand more about web hosting.