Web Installation Tool Suite

Install Apache HTTP server

Knowledge Base / Manual Installation

AddThis Social Bookmark Button

This article will help you install and configure Apache HTTP server. The installation is compatible with WITSuite family of products.

Save Your Time with EasyInstaller
Install Apache, MySQL, PHP in just a few clicks.
witsuite.com/products/installer/
Manage Your Web Environment
Install many Apache, MySQL, PHP versions and other packages with EasyManager.
witsuite.com/products/manager/
Table of Contents
Pre-installation notices
Installation
    Installing Apache MSI package
        Unattended install
        Installation wizard
    Installing Apache ZIP from apachelounge.com
Post-installation configuration
Creating Apache HTTP service

Pre-installation notices

The directory layout is described in the Create Directory Layout article.

For Windows Vista users: turning off user account control minimize the number of times operation system asks you for confirmation.

During installation your firewall software may ask you what to do with the apache executable that listens for incoming connections on some port. Depending on desired security settings and firewall features, you can allow incoming connections from any computer, from a network or only a few computers. Disabling all network access for the Apache executable makes connecting to the service impossible, even from localhost.

Continue with Installation.

Installation

There is not only one way to install the Apache HTTP server and you can choose the one that match your needs. Here is a comparison of two most popular Apache binaries:

Apache.org
Official project site that hosts source code repository, discussion groups, bugtracker and documentation. Installation options for Windows users are limited to MSI packages only.
apachelounge.com
Describes itself as "... group of webmasters, programmers and friends who enjoy working together and learning from each other's experiences in using and developing the Apache server." Offers Apache HTTP ZIP package.

Continue with Installing Apache MSI package or Installing Apache ZIP from apachelounge.com.

Installing Apache MSI package

Download the Apache HTTP Server MSI Installer from the Apache download page  to the C:\WITSuite\Packages folder. Optionaly, verify the integrity  of the downloaded file. The path of the downloaded file may be the following (for the Apache HTTP server 2.2.8):

C:\WITSuite\Packages\apache_2.2.8-win32-x86-no_ssl.msi

Continue with Unattended install or Installation wizard.

Unattended install

If you want to install Apache HTTP server in unattended mode, you can execute the following command (use command prompt):

msiexec.exe /i C:\WITSuite\Packages\apache_2.2.8-win32-x86-no_ssl.msi /passive installdir="C:\WITSuite\Servers\Apache-2.2" serveradmin=admin@localhost apachehtdocsdir="C:\WITSuite\Hosts\localhost"

Notes
  1. Replace apache_2.2.8-win32-x86-no_ssl.msi with actual downloaded file name.
  2. admin@localhost will be displayed on standard error pages. Replace it with an appropriate email address.
  3. Replace C:\WITSuite\Hosts\localhost with C:\Inetpub\wwwroot if you want IIS and Apache share the same documents folder.
  4. Apache HTTP service with not be created.

Continue with Post-installation configuration.

Installation wizard

Run the MSI package and follow the installation steps. Put the following values in the inputs on the "Server Information" step:

"Server Information" with proper values

Figure 1: The "Server Information" wizard step with recommended values.

On the next screen select Custom setup type and change the destination folder to C:\WITSuite\Servers\Apache-2.2.

In order to make installation self-container, the Apache HTTP server should be copied to the TemporaryFiles folder, uninstalled, and then moved back to original location (C:\WITSuite\Servers\Apache-2.2). You can skip this step but then you will not be able to install more then one Apache 2.2.x verion on the same computer.

Continue with Post-installation configuration.

Installing Apache ZIP from apachelounge.com

Download the Apache HTTP Server ZIP from the ApacheLongue download page  to the C:\WITSuite\Packages folder. Optionaly, verify the integrity  of the downloaded file.

You may need to download and install the Visual C++ 2005 SP1 Redistributable Package  in order to run this Apache version.

This distribution includes cryptographic software. Before using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See Handling Cryptography within an ASF Release  apache.org article and What about mod_ssl and the Wassenaar Arrangement?  modssl F.A.Q. entry for more details.

The path of the downloaded file may be the following (for the Apache HTTP server 2.2.8):

C:\WITSuite\Packages\httpd-2.2.8-win32-x86-ssl.zip

Unpack httpd-2.2.8-win32-x86-ssl.zip\Apache2 folder to C:\WITSuite\Servers\Apache-2.2.

Continue with Post-installation configuration.

Post-installation configuration

Create C:\WITSuite\Configuration\VHosts.conf file with one of the following:

When Apache should not share the same folder with IIS:
NameVirtualHost *
<VirtualHost *>
    ServerName localhost
    DocumentRoot "C:\WITSuite\Hosts\localhost\htdocs"
</VirtualHost>
or when it should:
NameVirtualHost *
<VirtualHost *>
    ServerName localhost
    DocumentRoot "C:\inetpub\wwwroot"
</VirtualHost>

Continue with Creating Apache HTTP service.

Creating Apache HTTP service

The service is identified by its name. For example, assume that the service is called "Apache-2.2".

Create the following folders:

Create service configuration file:

  1. Copy C:\WITSuite\Servers\Apache-2.2\conf\httpd.conf to C:\WITSuite\Configuration\Apache-2.2\httpd.conf.
  2. Configure directives as follows (replace the port and the service name with appropriate values):

    Listen 8081
    ServerName localhost:8081
    PidFile C:\WITSuite\TemporaryFiles\Apache-2.2\apache.httpd.pid
    ErrorLog "C:\WITSuite\Logs\Apache-2.2\error.log"
    CustomLog "C:\WITSuite\Logs\Apache-2.2\access.log" common

  3. Change the default DocumentRoot directive value. Default document root may be one of the following:

    DocumentRoot "C:\Apache2\htdocs"
    DocumentRoot "C:\WITSuite\Servers\Apache-2.2\htdocs"

    and should be replaced with one of (depending on whether Apache should share the same folder with IIS or not):

    DocumentRoot "C:\WITSuite\Hosts\localhost\htdocs"
    DocumentRoot "C:\inetpub\wwwroot"

  4. Change the default document root Directory directive. May be one of the following:

    <Directory "C:\Apache2\htdocs">...</Directory>
    <Directory "C:\WITSuite\Servers\Apache-2.2\htdocs">...</Directory>

    and should be replaced with one of the following (depending on whether Apache should share the same folder with IIS or not):

    <Directory "C:\WITSuite\Hosts\localhost\htdocs">...</Directory>
    <Directory "C:\inetpub\wwwroot">...</Directory>

Add the following configuration options to the end of the httpd.conf file:

<Directory "C:\WITSuite\Hosts>
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
Include "C:\WITSuite\Configuration\VHosts.conf"

Register and start Apache-2.2 (execute commands in Windows command prompt):

C:\WITSuite\Servers\Apache-2.2\bin\httpd.exe -k install -n "Apache-2.2" -f "C:\WITSuite\Configuration\Apache-2.2\httpd.conf"
net start "Apache-2.2"

Repeat these steps for each service you want to create.

Questions/Feedback

If you have question/feedback or see an error feel free to send it to us through the email address contact@witsuite.com.

AddThis Social Bookmark Button

Creative Commons License

(This page content is available under a Creative Commons Attribution-Noncommercial-No Derivative Works license.)

© 2007, WITSuite.com. Terms of Service, Privacy Policy, Refund Policy.