Install Apache

Table of contents

Introduction

The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows NT. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.

Apache has been the most popular web server on the Internet since April 1996.

The Apache HTTP Server is a project of the Apache Software Foundation.

http://httpd.apache.org/

Download & Unpack

Download and install Apache from http://httpd.apache.org/download.cgi.

Look for the Win32 Binary version.

Install

When you install Apache, you'll get a prompt for Server Information. Here are the settings I've used:

Apache Server Information

Network Domain
localhost
Server Name
localhost
Admin Email
(your email)

I recommend you to check for All Users, on Port 80, as a Service.

Path notes

If you choose Typical setup and C:\apache as your installation folder, it'll actually be installed to C:\apache\Apache2.

In Custom setup you can specifically choose where to install each of it's parts/sub-parts.

If you are updating from a previous version of 2.x, you will have to uninstall the old version before installing the new one.
However, Apache 2.x will play nicely with an older Apache 1.x version.

Starting / Stopping Apache

After installing, Apache2 will automatically start.

You can easily start | stop | restart Apache via that icon in your system tray.

If you get the error The requested operation has failed! while starting apache try the Test Configuration shortcut in the Start Menu to find the error (if the console window pops up and closes before you can read it, it means that your configuration is fine).

Testing

Now the ultimate test to see if it's all working.

Open your browser and head to http://127.0.0.1/ or http://localhost/.

Apache Installed

If you see the above Apache installation's test page then you have your server configured and running.

Making Apache point to your files

  1. Using a text editor open C:\<APACHE_INSTALLATION_FOLDER>\conf\httpd.conf and search for DocumentRoot.
  2. Change it from something like DocumentRoot C:/<APACHE_INSTALLATION_FOLDER>/htdocs to the location where you will place your HTML files (e.g. DocumentRoot C:/public_html).
  3. Then scroll down about one page and change <Directory "C:/<APACHE_INSTALLATION_FOLDER>/htdocs"> to point to the same location you set DocumentRoot to in the last step.
  4. Restart apache so the changes take effect.