www.websiteadministrator.com.au/articles/install_guides/installing_apache_2.2
 
  Friday, 31st March 2017
installing apache 2.2
INSTALLING APACHE 2.2
 

Super Hero Stuff Wolverine Jacket

Installing Apache 2.2 on Microsoft Windows


(Apache 2.2.16 Page 3 of 3)

Setup Type:

Next we are asked to specify the type of installation we want (Fig. 05). Typical is fine for our purposes, so we select typical and then select next.

(Note: If you would really like to see what is installed with this Apache software, you can select "custom", then "next" to see what components will be installed. Then select the "back" button to return to this window. This time choose "Typical" and then "next" to continue with the install as normal.)

Choosing the setup type best suited to our needs.
(Fig. 05)
selecting setup type apache 2.2.19

 

Custom Setup :

Most users can safely skip the custom setup step (Fig. 06) and simply use the default install option. A custom installation is not required to install and setup either MySql nor PHP.

Custom Setup offers the ability to compile and link further Apache Modules. If you know you need to, or wish to add this feature (see Fig. 06, highlighted in RED below with it's description on the right), select the menu item with the red X and choose This feature will be installed on the local hard drive from the drop down menu that is presented to you.

If you have selected a custom install, you would also confirm your installation directory at this point. The default destination is recommended.

"Space" allows you to check how much hard disk space is free on your drives while "Help" will display a key for icons used on this window.

(Note: You can easily add/remove any feature at any time by simply restarting this 2.2.19 installation file after the program has installed.)

Apache's custom install menu .
(Fig. 06)
Custom installing of apache 2.2.19

 

Destination Folder :

If you selected the Typical Install option, your next window will be the Destination Folder (Fig. 07). Like most programs, using the default destination folder makes life easier for those new to any software and Apache is no different. This step allows you to change exactly where apache is installed on your drive(s). However, most of us will simply select next.

Apache Destination Folder.
(Fig. 07)
Custom installing of apache 2.2.19

 

Installing and testing:

You are now ready to install your apache HTTP server. Select "install" (see fig. 08).

Ready to Install the Program .
(Fig. 08)
Custom installing of apache 2.2.19

The Apache installer now installs the required files into your system with the parameters we have selected.

Upon completion, you should note a new icon in the system tray which will tell you if your server is in a running or stopped state.

 

System Tray Server Status Icon.
(Fig. 09)
Installing and testing apache 2.2.19

 

If your Apache HTTP server 2.2.19 is running properly, you will see the icon with the green triangle inside. If not, use the start menu and find the configure apache server menu. Here you will find the test configuration link. Select this and you will either see a test window that will shut almost as quickly as it opened (this means all is fine) else you will be shown an error which will need to be corrected.

(If your apache icon does not display in the task bar, you can jump to the troubleshooter section: I can't find my apache system tray icon).

The administrator can easily manually start, stop or restart the server using this system tray icon (Fig. 09). Place the mouse cursor over the apache icon, depress the left mouse button, slide up to apache 2.2, and then select the server state required from the list. Right clicking the icon offers a more advanced range of options. To test your server, ensure the server is started and then simply initialize your internet browser and type either:

http://127.0.0.1

or

http://localhost

into your browser location bar and press the "enter" key on your keyboard. (You can also copy and paste the above links into your browser).

If everything is fine, you will be greeted with "It Works!" or if you have altered your home page directory as per the notes below, you will be greeted with "Index of/" and if this directory is one that already has a bunch of stuff inside it, you will see all your files listed there. Else, throw together a quick index.html, php test page or even a couple of .gif images or a .txt file into that directory so you have something to see.

If you have a problem with the localhost command, you can check your hosts file (there is no "." extension on this file) by browsing to C:\WINDOWS\system32\drivers\etc and opening the hosts file with notepad. If this next line is missing, add it then save the file. Re-start apache and try testing the above links again.

127.0.0.1       localhost

Let's now learn how to change the home page folder. You can point this apache home directory to any one of your test websites on your computer workstation. You can also repeat this next step at any time to point to another test website when switching between different website administration jobs.

 

Home directory/folder:

Your home directory (folder) and in a standard installation this is located at:

C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/

This is also called our document root and is where you would place your index.html file and all other media you plan to test or serve from this server. You would add any needed sub-directories from this root. Eg. an images or thumbs sub-directory.

You can also change this document root directory. This is especially handy if you administrate more than one website. If each website you administer has it's own directory, you can set that directory as the document root very easily. By doing this before you begin modifying each of your clients websites, you can fully test the interaction of an entire website before you take that website live with your changes. Let's learn how to do this.

 

How to Change the Document Root:

If you would like to change your document root (root directory), you can do so by editing two lines in the the Apache httpd.conf file.

The httpd.conf is the Master Configuration File for your apache server and can be found by exploring the location C:\Program Files\Apache Software Foundation\Apache2.2\conf\ on your computer. We can also gain access to this configuration file from the windows start menu through the Apache HTTP Server 2.2 program group by selecting Configure Apache Server and then selecting the shortcut titled Edit the Apache httpd.conf Configuration File.

The first line we wish to edit is: DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" (Note: make sure you read the line correctly and that you only change the line that says DocumentRoot and not the line which states ServerRoot.).

When you have located the DocumentRoot line, the administrator can then modify this to suit his preferred location eg. DocumentRoot "C:/public_html"

The second line we edit is only a few lines below our first edit and modifies apache's directory tag which we alter to: <Directory "C:/public_html"> (Note that both edits have identical paths as they both point to the exact same location).

Personalize this folder to better suit your needs, for example; "C:/www_campisi_pizza_website" or what ever makes it easier for you to locate each client among the list of client sites that you manage. Make sure you have created the folder/directory called public_html (or www_campisi_pizza_website) and place the applicable website files into that directory for this to work correctly.

If you plan to add password entry to your site, it is better to make the document root a couple of sub-directories in. eg. "C:/websites/campisi_pizza/public_html" The reason for this is that you will probably want to keep your password files off the web and away from search robots. This enables you to do this. Make sure you reflect any change in the Directory and DocumentRoot locations in the Apache httpd.conf file as you have now learned to do.

Always restart Apache after configuration changes

After you have completed these edits, you would also need to restart the apache service for the changes to take effect. So we click our apache icon in the system tray (or use the newly installed Apache HTTP Server 2.2 program group menu and named control apache server which you can access from the Windows start button - All Programs menu) and select restart to reinitialize the service with the new configuration. That's it!

Troubleshooting Your Apache 2.2.19 Installation

Here are a couple of pointers for you in the event that you may need to trouble shoot problems while installing Apache 2.2.19.

Apache Error Log

After testing your server, and if you have completed a default installation, you can check your server's error.log. Browse to: C:\Program Files\Apache Software Foundation\Apache2.2\logs\error.log. If you have the file open when you test apache, don't forget to re-open the file to see any new changes to the log.

Other common troubleshooting solutions may be found on the apache win32 notes page too.

I can't find my apache system tray icon

Here's a little tip if you can't find your apache status icon in the windows system tray. (near the clock). Most common reason is that Windows thinks it should not display it (or apache isn't working). In windows-speak, this is called a notification. So let's go customize some notifications:

a) right click the area around the clock
b) locate and select menu item customize notifications...
c) Scroll down the list of current items 'til you see apache
d) choose either always show or hide when inactive
e) save and you're done.

Module Completion

If you are confident with what you have learned here, then you have also gained a couple of very basic entry level skills into handling your apache server. Pat your self on the back, you have completed this module course.

Other recommended resources

Why Apache 2 a .ppt presentation by Jim Jagielski

Training
Next is this inexpensive self paced study course on the basics of, as well as some advanced uses of PHP and MySQL with popular servers. Also available are some unique advanced courses on Ethical Hacking and other Security courses which would be of interest to the technical minded. Special end of year offer for our readers.

Module Length:

  • 1 Hour

Pre-requisites:

The website administrator has previously attained the following computer skills:

  • Ability to download an installation file and execute it.
  • Ability to edit a plain text file (eg. use notepad).
  • Ability to rename a folder or directory using either Windows Explorer or My Computer.

Applicable OS Platforms :

  • Windows 7
  • Windows Vista
  • Windows XP SP2 + SP3
  • Windows 2000
  • Windows NT 4.0

Other Software-requisites: (for NT 4.0 or 2000 only)

  • NT 4.0 & Windows 2000 require Microsoft Installer 2.0 (InstMsiW.exe) (download file InstMsiW.exe 2Mb)
  • Windows NT 4.0 requires Service Pack 6 to work correctly (SP6a spi386.exe) (download file spi386.exe 34Mb [32bit version])
  • Internet Explorer 6 with Service Pack 1 or higher is installed (installs wldap32.dll which is needed for Apache to start).

Other Software-requisites: (for Windows 95 / Windows 98 / Windows Me only)

  • Win95 - too difficult for this guide, upgrade to minimum Win98 or other operating system (linux for example).
  • DSClient for Windows 98 is required. This is available on various Windows 2000 Server Cds or from the Microsoft Download Center.
  • Internet Explorer 6 with Service Pack 1 or higher is installed (installs wldap32.dll which is needed for Apache to start. This file is already installed if you are using Windows Me).

Hardware-requisites: (All)

  • x86 compatible family processor (eg. Intel, AMD)

 

Valid XHTML 1.0 Strict Valid CSS!

Copyright © 2011
Website Administration Services™
Module created by: Steve Campisi
(Graduate of the Australian Nationally Accredited Certificate IV in Training and Assessment course. Formal certificate for formal Training and Assessing in Australia.)

Header Photo Credit: Glenn Grant, National Science Foundation


 
 
 
 

 
 
 
 
   

 
 
 
 

Powering over 120 million Webservers world-wide, Apache is the most prolific server software on the internet and this easy to follow module will guide the administrator through each of the needed steps of the install process so that in a short amount of time, his first Windows based Apache HTTP Server will be setup and running and he can have at it.


 
 
 
Website Employment &
Job Opportunities


America
Australia
Brazil
China
Europe
India
New Zealand
Philippines
South Africa
United kingdom