Introduction to Apache Server Setup:

Setup Apache Server - Process Street

This Process Street Apache server setup process is engineered to take the user through the steps necessary to create a new Apache server on a Windows. The process does cater to other approaches with extra tips throughout.

This guide will assume a Windows server running on 64 bit and installing Apache 2.4.17

The Apache server has been the most popular web server on the internet since 1996 and is now 22 years old. It's reliability and open source nature has made it a mainstay within the tech world.

This Process Street checklist provides a repeatable guide to setting one up and, being editable, allows for you to optimize the process relevant to your environment.  

There are form fields throughout the checklist where you can enter information. This information is then stored in the template overview tab and acts as an activity log, documenting what was set up, why it was set up, and how and where it was set up. This documented process is a useful part of maintaining activity communication across teams. All data is stored in a spreadsheet format and can be exported as a CSV file.

To know a bit more about Apache, watch this video below:

Install Apache 2.4 Server on Windows 10 - APmonitor.com
Installing Apache Web Server on Windows 7, 8, 10 2017 - Ask Abdullah

Record checklist details

Use the form fields below to record the details of the checklist.

Download Apache for windows

You can download Apache from ApacheLounge.

Download either 32bit or 64bit depending on your server's system requirements. 

Record which version you have downloaded below

Make sure you have the relevant C++ Redistributable for Visual Studio installed on the server before you continue. 

You can find the extra resources on the ApacheLounge website on the link above.

Unzip and extract Apache

Open the downloaded "httpd-2.4.17-win64-VC14.zip" file and extract its content. 

Save this content to a location within your server like:

  • C:\Apache24
  • D:\Apache

The rest of this guide works on the premise that you have extracted to C:\Apache24, so save the contents there to make the rest of the steps easier. 

Use the form field below to record where you extracted the files to.

Configure Apache

Locate the file "httpd.conf" in the conf directory and open it in a text editor. 

If you extracted your file to C:/Apache24 you can move on to the next task

If you extracted your Apache file to D:\Apache you would be able to make the changes within this text file. 

The changes would be as follows:

ServerRoot "C:/Apache24" → ServerRoot "D:/Apache"

DocumentRoot "C:/Apache24/htdocs" → DocumentRoot "D:/Apache/htdocs"

<Directory "C:/Apache24/htdocs"> → <Directory "D:/Apache/htdocs">

ScriptAlias /cgi-bin/ "C:/Apache24/cgi-bin/" → ScriptAlias /cgi-bin/ "D:/Apache/cgi-bin/"

Add ExecCGI to Options directive

We need to instruct Apache that CGI/Perl scripts are allowed outside of the cgi-bin directory.

To do this, we need to modify the http:conf file. 

Find the below line within the code:

Options Indexes FollowSymLinks

Then make the following addition to the line:

Options Indexes FollowSymLinks ExecCGI

This should allow the CGI/Perl scripts to operate as intended. 

Instruct Apache on how to handle .cgi/.pl files

We want Apache to take .cgi flies and .pl files and execute them rather than presenting them as text to a web browser. 

In order to do this, we need to find two lines of our code and simply uncomment them. Just take away the hash (#) at the beginning of the line to uncomment. 

Find these two lines and uncomment them:

AddHandler cgi-script .cgi
AddHandler cgi-script .pl

Set Apache to locate Perl from the Windows Registry

The first line of .cgi/.pl files directs Apache to the install location of Perl. 

We want to change this so that the first line is ignored and the location of Perl is determined from the Windows Registry. 

To do this, we simply need to add one line to the end of the file. Add this line below to change how Apache locates Perl:

ScriptInterpreterSource Registry

Start Apache

Go to the location where you extracted Apache and enter into the bin folder. 

Hold down shift and right click in order to view your options. You should be presented with the option Open command window here

Click here to open the command window and enter the following command:

httpd.exe

Depending on your settings, Windows may present you with a firewall warning. Continue through the window presented to you, allowing access to Apache as appropriate. 

Check Apache is running correctly

In order to check your Apache server is running and your setup has been so far successful, keep the current command window open and open your web browser

Navigate to:

http://127.0.0.1

If Apache is running correctly, it should tell you whether or not it is working. 

Use the form field below to record what Apache tells you.

Install Apache as a Windows service

We need to make sure that Apache is running all the time

With our current setup, Apache is only running while the command box is open. In order to make sure it continues running we need to set Apache up as a Windows service. 

To do this is quite easy and requires only two short commands.

Open your command prompt as before and enter the following line to install the service:

httpd.exe -k install

You can then use the next line to start the service and have it running on a continual basis:

net start Apache2.4

This should then tell you that Apache2.4 was started successfully.

Monitor Apache and create shortcuts

To make your life easier, Apache has included a small window within the package which helps you monitor the service. 

This will provide you with a quick and intuitive way of being able to stop, start, or restart the server at any time

Enter the bin folder as before and look for a file called ApacheMonitor.exe

Double click on this file to open the monitor and then create a shortcut for the monitor on your start menu or desktop for easy future access. 

Apache Service Monitor

Sources:

Sign up for a FREE account and
search thousands of checklists in our library.

Sign up for a FREE account and search thousands of checklists in our library.