Run a free Web Server from Home on Windows or Linux With Apache
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.
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!
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.
2.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.
3.Type 192.168.1.1 or the gateway you got from the previous step into the address bar of your internet browser.
4.Log into your wireless router. Default username and passwords are usually admin:password.
5.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 to80.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.
1.Download the latest release of the Apache web server with an
2.Run the installer.
3.When presented with the option, make sure to install the Apache service.
4.Open a command prompt and navigate to the Apache bin directory under
C:\Program Files\Apache Group.
5.Run the service.
httpd -k start
1.Run your package manager and install Apache. I run Arch, so here was what I input:
sudo pacman -S apache
2.Run the service.
sudo rc.d start apache
3.Visit 192.168.1.1 to see the Apache test page.
4.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.