How to Host Your Own Website at Home
Running a website is a common occurrence in today's world. Sites like GoDaddy.com and 1and1.com offer cheap hosting plans that almost anyone can afford. Many offer "one-stop shopping" experiences, where you can find and register a domain name, sign up for a hosting plan, and even design and build your site right from their included control panel. However, you may find yourself wanting to host your own site for a variety of reasons. You many not want a limitation on your bandwidth, you may want to avoid signing a restrictive Terms of Use agreement, or you may merely want to learn how to host your own site. It can be done from your own home.
Instructions
-
-
1
Register your domain with a domain registrar. Most hosting providers allow you to register your domain without creating a hosting account. Third-party companies that provide this service include godaddy.com, 1and1.com and hostgator.com. Follow their instructions to find an available domain name and register it.
-
2
Download and install Apache's Web server (httpd.apache.org/). Apache server technology is behind many of the servers on the Internet today, and is free and cross-platform. In fact, Apache comes pre-installed on Mac OS X. To install Apache for Windows, choose the desired version from httpd.apache.org/download.cgi and click the download link. Double-click the downloaded .msi file to start the installation wizard. Follow the onscreen instructions to install Apache to your hard drive. From the available options, choose "Run Apache as a service" and "Install for all users" to streamline the site hosting process later. Restart your computer after installing Apache to update relevant system files and start the Apache service.
-
-
3
Test your Apache server by opening a browser and typing "localhost" in the address window. You should see a simple page that reads "It works!" If the installation fails, check your error.log file and adjust your processes and permissions as needed.
-
4
Configure your Apache server by editing the plaintext lines in the httpd.conf, the access.conf, and the srm.conf files. These lines are called directives, and Apache uses these files and the lines they contain to determine how it is run. Arguably the most powerful of these directives is <Directory>, as this determines which directories on your server are actually "served" to another computer over the Internet. In general, if you use the computer on which Apache is installed as a Web server only, then all files on that hard drive will be accessible via the Internet. You can block access to a directory with the <Directory> directive, but it is easier to simply make the machine totally accessible.
-
5
Restart your Apache server after editing the configuration files, as changes are only applied upon restarting the service.
-
6
Configure your router to allow port-forwarding. If you are connected to the Internet behind a router, you will have to configure it to forward requests on port 80 (the most common HTTP port) to the computer containing your Apache installation. Methods for doing this will vary; consult your router's owner's manual for detailed port-forwarding instructions.
-
1
Tips & Warnings
Check with your ISP before you make your website live. Many ISPs do not allow hosting on their network.