Installing and configuring the server
Downloading Apache for Windows
First things first!
You can find the binary of Apache 2.0.39 for Windows at:
http://www.apache.org/dist/httpd/binaries/win32/ [
direct link]. The file is 3.2 MB, and is distributed as an MSI package.
Installing Apache
Open the file you just downloaded and read the prompts until you get to a screen
that looks like the one below. Fill in the information as I have, and then
enter your own email address in the last box.
The rest of the installation prompts are self-explanatory, so all you have
to do is pick a directory to install to and then wait for the installer to
finish. I recommend installing Apache to
a separate partition or drive in order to keep things neat and clean (if that's an option for you).
I should also mention that unless you choose otherwise,
Apache2 will
be appended to all folder paths. This means that if you install to something
like
H:Apache, it'll actually get installed to
H:ApacheApache2.
I guess it's just one of those weird idiosyncrasies that everyone loves.
Having done all that, open your browser and type
http://127.0.0.1/.
If you see a page that looks like the one below, you may sit back and relax,
knowing that half the battle is already over.
If you don't see that page, uninstall Apache, and then start over, making sure
to read each prompt carefully. If you still can't get it to go after trying,
say, ten more times, email me and I might be able to help you out. Alternatively,
you can peruse the Apache help docs, located at
http://httpd.apache.org/docs-2.0/.
Configuring Apache
And now comes the fun part.
Opening the httpd.conf file for editing
Click on
Start, then
Apache HTTP Server 2.0.39, then
Configure Apache Server and finally
Edit the Apache httpd.conf
Configuration File. This will open up the
httpd.conf file in
Notepad so that we can edit it. Know that if you make any huge
mistakes while editing this file, there's
always a backup
copy available for you, and it's located in your
H:Apache2conf folder. The backup is named
httpd.default.conf.
Setting up some basic values
Search for
DocumentRoot
and then change it from
DocumentRoot
"H:/Apache2/htdocs"
to wherever you want to keep your site's
HTML files. Mine is
DocumentRoot "H:/httpdocs"
, because
I have my HTML files located at
H:httpdocs. Now search for
"H:/Apache2/htdocs">
and change that path to the same
as the previous one you picked out.
Turning on Server-Side Includes
If you don't know what SSIs are, or you just don't want to use them, you can
safely skip over this section. Otherwise, this is what you need to do in order
to turn site-wide SSIs on.
Search for
Options Indexes FollowSymLinks
and change it to
Options
All MultiViews
. Then, search for
#AddOutputFilter INCLUDES .shtml
and change it to
AddOutputFilter INCLUDES .html .htm .shtml .shtm
.
Note: you can customize that last bit to your liking, if you
wish. If you
don't want all files with the extensions
.html and
.htm to be parsed, remove
.html
and
.htm
from the list. If you want any other file extensions besides the ones I've
added to be parsed, add them in the same manner to that list.
Restarting Apache
Restarting Apache is easy to do, and it will need to be done whenever you make
any changes to the configuration file (
httpd.conf). Because the file
gets read only when Apache starts, new changes won't take effect until you
restart Apache. Double-click the
Apache Service Monitor icon in
the system tray (it's the one that looks like a feather with a green triangle
on it) to open the monitor. Now just click the
Restart button and
wait for Apache to do it's thing.
After the server has been restarted, you'll see a message letting you know
that the changes went through successfully. If you made a major error editing
the file, Apache will let you know about it with an error message.
Page 2:
Installing the Perl package