Putting a Web Server on your Home Computer

Those of you interested in web development might want to build your own web pages on your home computer before going to a web hosting service to get on the Internet.

Although you can always do a file open in your browser, and load a page on your computer ending with an .html extension, once you start putting a series of pages together and want some additional functionality like a web scripting language, like php, or a database, like MySQL, you will want to have your own web server on your computer.

A web server is a program that takes in URL requests sent by a browser, and responds to those requests, by sending back the requested web page to the browser that requested it.  For example, you type in a URL web address, www.geekgumbo.com, in your browser and press go, you are connected to the geekgumbo web server on the Internet, which returns this page to your browser.  Pretty neat, and what makes the web go round.

Installing a web server on your computer means you can make URL browser requests to your own web server, usually called "localhost".  To do this, you type in the "localhost" URL in your browser address field along with the name of the pages you are building on your computer, for example, "http://localhost/yourwebpage"  The browser sends the URL request to your web server, "localhost", and "localhost" returns the requested web page to your browser window just like a web server on the Internet.  Using your own web server means the web pages you build will execute just as if you are actually on the Internet.  This is the way most web developers build web sites before publishing them on the Internet.

There are several web server applications running the Internet.  The two biggest are Apache, and Microsoft IIS.  Apache is the web server for over 100 Million web sites at present, and, by far, is the leading web server with 66% of the business sites.  We will focus on Apache, mostly because its what we know, and secondly, because all the open source, free, technologies work well with it.

Apache usually comes with PHP and MySQL in what is normally called a LAMP stack.  LAMP standing for Linux, Apache, MySQL, and PHP.  Don't let the Linux scare you away it runs on Windows as well.

There are currently two LAMP stacks available for free, XAMPP and WAMP.
XAMMP runs on the Windows, MacOS, Solaris, and Linux operating system.  WAMP only runs on Windows.  WAMP stands for, you guessed it, Windows, Apache, MySQL, and PHP.

Right now, XAMMP is the leading home pc server, but if your running Windows, either XP or Vista, we prefer WAMP.  Having installed and used both servers at one time or another, we feel the WAMP interface is much easier to use, and configure then XAMPP.  XAMMP requires some configuring after you install it that you don't have to worry about with WAMP.

Download either, and give it a try. They both come with initial screens that let you know their installed properly.  Put the web pages your building in the htdocs directory under XAMPP, or in the WWW directory under the WAMP directory and walla... your off and running as a future web developer.

Comments are closed.