How to Host Your Own Website from Home Using Windows?

Learning how to host your own website from home can open possibilities of cutting cost in your annual web hosting fee especially if your website demands critical IT Management due to the huge traffic it generates daily. Your business will surely benefit from your knowledge of how to host your own website from home, and web hosting will no longer be a service you avail, but also a service you provide soon.

Before diving into the steps on how to host your own website from home, take note of the basics: Your computer hardware will be tasked to act as a server. The server is built to store and send data across the internet, that provides online access for your website. So technically, learning how to host your own website from home is learning how to set up your own server using your personal resources. What learning how to host your own website from home will introduce are the pieces of software that ensure that your web hosting process will run smoothly.

How to Web Host Your Own Website from Home

Steps on How to Host Your Own Website from Home Using Windows?

These steps will help you put up a web host using your home machine and a normal desktop environment.

  1. What you need: Windows machine, AMP stack (a bundle including Apache, MySQL, and PHP, thus called SWAMP), and an installation program like WampServer.
  2. Go to WampServer website and download the program. Choose the one that fits your OS specs.
  3. Make sure that Skype isn’t running before you install the program, or else, you’ll get a port 80 conflict. Both Skype and WampServer use port 80, so fix the error by disconnecting from Skype.
  4. A www directory will automatically be created and you can find it at “c:\wamp\www”. This directory is where your website (or sites) will live, by simply creating a new folder in the directory and house your PHP or HTML files inside.
  5. Test that WampServer if it is working by accessing the main screen: Click on the link in the menu or go to “http://localhost”.

Testing Wampserver

Learning how to host your own website from home is not over yet. It has to take on several stages before your site can go live. On this stage, we’ll make a simple test PHP file and put it into the directory.

  1. Open up NotePad in Windows and enter the following line: <title>PHP Test</title>
  2. Save that file as “info.php” in the www directory created by WampServer.
  3. Open web browser back up and go to “http://localhost/info.php”.
  4. If you see a blank page with “PHP Test” on the tab name, then everything is running how it should

Configuring MySQL Databases

The next stage in knowing how to host your own website from home is the configuration of MySQL databases is necessary if you aren’t using a CMS like WordPress. Organization and transmission of data is quick if you’ll be using MySQL. A Content Management System (CMS) uses MySQL as a means to send information towards the user.

You can alter existing databases or create new ones:

  1. Click on “phpMyAdmin” in the “tools” section of the WampServer main screen.
  2. A new tab opens, requesting a username and password. Username is “root” by default then leave the password field blank.

To ensure that MySQL is working:

  1. Open a new tab and go to “http://localhost/testmysql.php”.
  2. You’ll see the IP address of your machine, and will specify whether your connection is okay or not.

Note: Using a CMS would never need to dive into this area.

Pushing Your Site Live:

The next stage in knowing how to host your own website from home is pushing your site live. Since, the Apache configuration file is set to deny any incoming connections by default, only your local machine can access your site. That’s fine with running a test site, but change in configuration is needed to go live.

  1. Go to WampServer menu and click on “Apache” and then “httpd-vhosts.conf”.
  2. Your Apache configuration file should have the following lines inside:

# Virtual Hosts

#

<VirtualHost *:80>

 ServerName localhost

 ServerAlias localhost

 DocumentRoot “${INSTALL_DIR}/www”

 <Directory “${INSTALL_DIR}/www/”>

   Options +Indexes +Includes +FollowSymLinks +MultiViews

   AllowOverride All

   Require local

 </Directory>

</VirtualHost>

  1. Change “require local” to “require all granted in order to allow incoming connections.
  2. Restart WampServer for the changes to take effect by selecting “Restart All Services”.
  3. Make sure that your PC firewall isn’t blocking web requests. PC firewall should be set after the changes are made.

Adding a Domain Name

The last stage in knowing how to host your own website from home is adding a domain name. Add a domain name so that your IP address can easily be found upon web browser search. This is possible with DNS records, which is a system that connects your local IP address to your domain name. So, once you have an A record for your domain in the DNS records, you need to update your local host file.

  1. Go to “C:\Windows\system32\drivers\etc\hosts file”
  2. Add the following line to the bottom:

199.999.999.99 (your IP address) example.com (your domain name)

       3.  Add a file manually into “C:\wamp\bin\apache\Apache-VERSION\conf\extra\”, where VERSION is your version of Apache.

       4. Create a file in NotePad with the following lines:

ServerAdmin mail@example.com

DocumentRoot “c:\wamp\www”

ServerName mysite.local

ErrorLog “logs/example.com.log”

CustomLog “logs/example.com-access.log” common

Note: replace “example.com” withyour domain name

5. Save the file in the Apache directory and your website is finally accessible using the domain name you made.

That’s it! How to host your own website from home using windows is as easy as 1-2-3!

How to Web Host Your Own Website

Contact

601 Pittsburgh Avenue P.O. Box 1167
Mount Vernon, Ohio 43050

Toll Free: (740) 393-3100
Fax: 740.397.0555

info@nfolink.net

Send us a message