Web Server Installation and Configuration on Windows 2000/XP/2003
The following article is based on years of experience. It is provided as a free service to our customers and visitors. However, Directron.com is not responsible for any damage as a result of following any of this advice.
Copying the contents for commercial purposes is strictly prohibited without Directron.com's written consent. However, you are welcome to distribute these computer support tips free to your friends and associates as long as it's not for commercial purposes and you acknowledge the source. You are permitted and encouraged to create links to this page from your own web site.
A web server can be defined as any computer configured to host publicly accessible files such as text and images. Web servers enable users all around the world to easily access nearly limitless stores of data and information. With more advanced web server configurations, a web site can harness the power of a web server to provide dynamic up-do-date information that is relevant to almost any topic. Although the thought of setting up a web server can be quite intimidating, it is actually a very simple process. The following guide offers step-by-step instructions on installing a simple Apache based web server.
Something to consider before continuing:
Where do you want to install your web server? This is a very important question. You will need to consider how much traffic (visitors) your web site will have. If the web server is going to be used for home or a small business, there will be no problem running the server software on the same computer you use for your day-to-day tasks. If you require excellent performance and know the site will be visited often, you may want to consider installing the software on a ?server? machine, in other words, a computer that is used mainly for the purpose of serving web pages. This ?server? machine does not need to be anything fancy. Many have had success with machines running Pentium 2 based CPU?s with no problems whatsoever. The whole point of using a machine dedicated to being a web server is that its main priority is to power the web site as efficiently as possible without having to reserve CPU cycles on the loading of different programs (Internet Explorer for instance); thus creating a smoother, more enjoyable experience for users visiting your site.
1. Download Apache from http://httpd.apache.org/download.cgi.
Look for the "Win32 Binary (MSI Installer)" version.
For Example: apache_2.0.53-win32-x86-no_ssl.msi
Save the file to your desktop for easy access. Double-click the installer file (name should be similar to the example above). The installer will look like any other normal windows installer.
Click next through the first set of screens until you reach a screen that looks like this:
The information in these fields should be filled in with (substitute your email address in for firstname.lastname@example.org):
Using localhost for your network domain and server name will ensure that your server will be up and running without problems. The term ?localhost? simply means the current computer you are on.
It is highly recommended to install apache ?for All Users, on Port 80, as a service?. This means that the Apache web server will always be running, in the background, out of your way. What?s great about services is you are never required to open any program to start up your web server; simply having your computer on keeps the web server running.
Click next after filling in the fields. The program will begin installing the required files and then simply click the ?finish? button after it has completed.
After installation, Apache2 automatically starts. The icon in the System Tray means it has started. The icon
means the "Monitor Apache Servers" is running, but Apache2 isn't started.
You can easily start/stop/restart Apache and Apache2 via that icon in your System Tray. If you get "The requested operation has failed!" error while starting apache, use the "Test Configuration" shortcut in the Start Menu to find the error. (If the text window pops up then closes before you can read it, your configuration file is fine.)
Now test to make sure the server software is running. Open up a web browser (Internet Explorer) and type in the address:
http://127.0.0.1/ or http://localhost/, a window like the one below should be displayed:
If your web browser displays the same information as the picture above, then your web server is up and running!
Now that your web server is up and running, there are a few things you will need to setup in your configuration file to make Apache run more to your liking.
Start Menu/All Programs/Apache HTTP Server/Configure Apache Server/Edit the Apache httpd.conf file
This will bring up a text file looking like this:
It may seem like a lot of information, but don?t worry, you will only be changing a few things.
First go to the Edit menu and select ?Find?. In the box that pops up, type the word ?DocumentRoot? without quotation marks. Click the find button and you should now be 1/3rd of the way down the document. The window should look a lot like this:
Notice that DocumentRoot is by default set to:
?C:/Program Files/Apache Group/Apache2/htdocs?
DocumentRoot simply means where you will be storing your website. It is highly recommended that you change this default setting to a folder located on your hard drive that you can easily access, for this guide we will use a folder named ?website? that is located at the top level of the C: drive. Once you have created the website directory, you will want to edit the DocumentRoot line in your httpd.conf file to match the path to your directory you have chosen. For this guide, it is C:\website. So we change the DocumentRoot line from:
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
Next go to the Edit menu again, select find, and type DocumentRoot into the box and click find. Your window should jump down to the middle of the configuration file and will look like this: (if not try hitting the find button again)
You will see a line that contains:
<Directory "C:/Program Files/Apache Group/Apache2/htdocs">
Change this to whatever you used for the DocumentRoot locations for example:
For the last step in editing the configuration file you will need to go to the Edit menu, and click find to search for one more word. In the find dialogue box enter the word ?DirectoryIndex? without quotation marks. Click the find button and the window should scroll down to an area that looks like this:
The directory index value tells the web server what page will be the index page for your website. In most cases this line does not need to change, but because many times index pages are named ?index.htm? we will need to add that filename to the configuration file. So change this line:
DirectoryIndex index.html index.html.var
DirectoryIndex index.html index.htm index.html.var
Your line should now look like this:
This will ensure that the index.htm files (often created in Dreamweaver) will not be overlooked as an index page.
After changing the DirectoryIndex line, go to the File menu and click ?Save?.
Close the text document and you should be back at your desktop.
For the final step, we will want to have the changes we just implemented to go into affect. To do this, you will simply restart your web server:
Double Click the
icon in the lower right hand corner and a window should come up:
Make sure the word ?Apache2? is highlighted in blue and then click the ?Restart? button on the right. The window should then change and look like this:
Click the ?OK? button on the right and you will be returned to your desktop. Now simply put your web pages into the folder you created for your DocumentRoot, and your site will be up and running!
If you have a firewall, don?t forget to forward Port 80 to the web server?s IP address! (Check the Firewall guide on this website for instructions.)
Web Server installation guide by William Hardy ? email@example.com