Paying for web hosting isn't ideal in most situations. If you have your own website, hosting it yourself is very acceptable and easy to do, assuming your internet bandwidth permits. Most people want to run a personal site, nothing crazy, so hosting from home on low-bandwidth internet is actually a better solution in most cases.

In this Null Byte, I'm going to show you how to set up your own web server from home using the free Apache web server. You can be running Windows or Linux, because I will be covering them both!

Requirements

A website to host (for testing purposes, not really needed if you just want to learn)

Windows or Linux

Step 1 Enable Port Forwarding

First, let's set up port forwarding so that you can access your website from an external network.

Click Start.

In the search, type cmd and hit Enter. In the prompt, type ipconfig, and it will list your default gateway and IP address. Take note of both.

Type 192.168.1.1 or the gateway you got from the previous step into the address bar of your internet browser.

Log into your wireless router. Default username and passwords are usually admin:password.

Click Port Forwarding somewhere on the page. All of them look different, but here is how mine looked:

Click Port Forwarding on the router page.

Set the host to your computer's IP address that we noted, and the port to 80.

Go to What Is My IP Address and write down your IP. You will need this for reference later, as well as during the Windows install of Apache.

Step 2 Register with DynDNS

DynDNS will allow us to have a domain to visit and remember for our webserver, rather than remembering our dynamic IP all of the time. Simply sign up for the service and fill in your IP, it's really straightforward.

Step 3 Install the Apache Web Server

Follow the instruction set that corresponds to your platform.

Windows

Download the latest release of the Apache web server with an .msi extension.

Run the installer.

When presented with the option, make sure to install the Apache service.

Open a command prompt and navigate to the Apache bin directory under C:\Program Files\Apache Group.

Run the service. httpd -k start

Linux

Run your package manager and install Apache. I run Arch, so here was what I input:sudo pacman -S apache

Run the service. sudo rc.d start apache

Visit 192.168.1.1 to see the Apache test page.

To add your website to your server, just put the files in /srv/www/.

There you have it. Better than paying hosting for terrible service! You will also have complete control over your website, so it really benefits in the long run.

I did some more digging and found you can still get free service, its just more limited than the free service once was. It is kind of difficult to locate but sign up, activate, then once signed in click sign in again, you should then see a big yellow my account button, click on it and get started.If you already have a free dyndns account and are using it make sure to check out this page, its about the changes and may affect you. "

Ah, that's good to know, I was just about to post some alternatives. There are many other free dynamic DNS services if people choose to not use DynDNS, just so everyone knows. They are just my favorite.