You are here

Windows Apache Server

Subscribe to Syndicate
For the purposes of this example, assume that the IP range of the Theatre Manager network is 192.168.1.x and the IP address of the Apache server in the DMZ is 192.168.1.5. Please check with the local IT Administrator to confirm.

Notes:

  • Note that the instructions assume that IIS is not installed, or that it is turned off, or that it is operating on different ports from 80 and 443.
  • This installer is intended for Windows 2000, 2003, 2008, XP, Vista or Windows 7.
  • Upgrading Apache from an earlier version is similar to installing it. The following additional steps are required
    • Stop all web listeners
    • Navigate to the C:\Program Files\Apache Software Foundation\2.2 folder
    • Make a copy of the 'htdocs' and 'conf' folders on your desktop
    • Perform all the install instructions below
    • At the end of the installation of the new version, compare your htdocs folder with the new reference standard web pages and adjust as neccessary
    • Replace the conf folder installed into c:\Program Files\Apache Software Foundation\2.2 with the conf folder you saved on your desktop
    • Start Apache and your web listeners

General Installation Steps

Step Purpose
Step 1

Download the latest installer using TMApacheSetup.exe and save it to the desktop

When downloading any update for Theatre Manager, please make sure your personal firewall is turned on (PCI requirement 1.4)
Step 2 Double click on the TMApacheSetup to start the install. If you are asked if you want to run this file because it was downloaded from the internet, please do so.
Step 3 Click Next

Step 4 Click Next

Step 5 Select where you want to install the 'Installer' to.

This part of the install is not actually installing Apache (yet). It is only placing the install files on the computer. Once they files are there, then the actual Apache installer will run.

We recommend that you accept C:/BoxOffice as the install location because that is where we put the PostGres install files as well.

Click Next

Step 6 After all the files have been put in the correct location on the hard drive, you will be asked if you want to start the Apache installer at that time.

If you wish to, click 'yes'

If you wish to do this later, you can go to C:/BoxOffice and run the 'ApacheInstaller' link

You will also be give the option of installing the FileZilla FTP server at the same time. This is used to let Theatre e-blasts automatically post jpegs to the apache server so that they will be visible for users. If you also want to install this, click 'Yes'. If you want to do it later, you can go to C:/BoxOffice and run the 'FileZilla installer' link

Step 7 If you clicked 'Yes' above, you are now ready to begin the install process for Apache on the PC. Click the 'Next' button

Step 8 On the license screen, click 'I accept the terms in the licence agreement' then click Next

Step 9 Click Next

Step 10 Apache needs a minimum amount of configuration. In the examples, you may just need to replace 'myserver.org' with your main domain name for your venue.

please enter:

  • Network Domain is the name of your web site up at your ISP.
  • Server Name is the name of this server. We recommend 'tickets.myserver.org'.
  • Administrators email address.
  • If you want to change and of these later, you can do so by editing the httpd.conf file. It is easier to get them right at this time.

Step 11 Click 'Typical' if it is not selected and then Click 'Next'

Step 12 Select the destination.

Please accept the defaults and click 'Next'.

Step 13 Click 'Install'

Apache will intall and register itself with the operating system

Step 14 Click 'Finish'.

If you opted to also install FileZilla, please follow the directions here and come back to continue with the rest of the Apache install.

Final Customization Steps

Step 15 There are some manual steps to configuring Apache on the PC

Open up a view to the C:\BoxOffice folder where the installers were placed

Open up a second view to the C:\Program Files\Apache Software Foundation\Apache2.2 - or wherever you installed Apache. On a 64 bit operating system like 2003 server 64 bit, this could be C:\Program Files x(86)\Apache Software Foundation\Apache2.2

Files to move are:

  • copy the 'data' folder in it's entirety from C:\BoxOffice into the Apache2.2 folder
  • copy the 'htdocs' folder in it's entirety from C:\BoxOffice into the apache2.2 folder. You should be asked if you want to replace the existing files. Click yes.
  • open the 'Modules' folder and copy the mod_tm.so file to from C:\BoxOffice into the Apache2.2\modules folder.
Step 16 Test the server to see if it starts out of the box. At the lower right corner of the computer, there should be an icon that looks like a pencil (its really a feather) that is red and has a green triangle in it. If it is there, you are ready to skip to the next step and test the apache browser.

If the icon has a 'red' square in it, then click on the icon and you'll see and 'Apache 2.2 menu popup and then slide to the right and 'start' the server. If that does not work, please contact tech support as it means there is a configuration issue someplace.

Step 17 If Apache is running, then the next step is to test the browser before making any changes to the config file.
  1. Start a web browser like Internet Explorer
  2. Type 'http://localhost/apacheindex.html
  3. The page should respond with 'It Works!' as per the picture below. If it does not respond like this, or it spins forever, then possible problems are:
    • You did not stop the IIS server
    • You need to open Ports 80 (and 443) on this machine
    • Some other service is using ports 80 and/or 443 and they need to be disabled.
    • You need to restart the computer.

Step 18 We are now ready to configure the server for security and behaviour related items. We'll do this by copying some data from the sample httpd.conf file to the apache httpd.conf file.

NOTE: DO NOT REPLACE THE HTTPD.CONF FILE otherwise it will not work. You must copy/paste the configuration as follows

  1. Open up the conf directory in C:\BoxOffice
  2. right click on httpd and Edit the file with 'wordpad'
  3. Highlight all the text in this file and copy it

now in the httpd file in the conf directory in the Apache2.2

  • open the conf directory in the Apache2.2 folder
  • edit the httpd file
  • scroll to the very bottom
  • paste all the code you copied above into the end of this file

Step 19 Scroll back up in the conf file that you just pasted the code into (the one in the Apache2.2 directory, not the one in C:\BoxOffice). Look for a series of #LoadModule commands. It will look like the picture below. Near the end of them, about 8 lines up, there is a line that says

#LoadModule ssl_module modules/mod_ssl.so

remove the '#' from the beginning of that line.

Save the file

 

Scroll down in the conf file (the one in the Apache2.2 directory, not the one in C:\BoxOffice). About 1/3 of the way through the document there is a line that says:

#ServerName tickets.mytheatre.org:80

remove the '#' from the beginning of that line.

Save the file

 

Scroll down in the conf file (the one in the Apache2.2 directory, not the one in C:\BoxOffice). About 3/4 of the way through the document the EnableMMAP information will appear. If this machine is running a 32 bit operating system make the following changes:


EnableMMAP off
EnableSendfile off
Win32DisableAcceptEx

Save the file

 

Scroll down in the conf file (the one in the Apache2.2 directory, not the one in C:\BoxOffice). Just above the copied text for Theatre Manager there are lines that says:

# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf

remove the '#' from the beginning of the Include conf/extra/httpd-ssl.conf line.

Save the file

Step 20 Scroll back to the bottom of the httpd file that you are editing.
  • Look for the line that says 'SetEnv TM_LISTENER_MASK'. This allows you to describe which machines can talk to the listener.
    • the default is to allow 192.168.0.255 which means any machine behind the second firewall. If your subnet IP ranges are not the same, please change as appropriate
    • It also includes an entry for 127.0.0.1 so that the apache will listen for a web listener running on itself.
    • If you have multiple subnet's in your network, you can add as many as you wish, separated by commas.
    • If all machines on the subnet could act as web listeners, then leave the last segment of the ip address as .255 If you do this, then the servers can by and dynamic IP addresses. This is the preferred approach.
    • If you want to specify specific machines that can act as Theatre Manager web listeners, then enter a string of ip addresses for the specific machines. If this is the case, we recommend that the machines be at static dip addresses.
  • There are three other environment variables to set:
    • SetEnv TM_WAIT_TIME is used to indicate how long Apache should wait trying to contact any web listener before sending back the page called 'TMSysBusyListeners.html. Think of this as how long you want a user to wait before they get sent to the 'we are busy' page so that they can try again. We recommend not changing it from the 10 seconds default.
    • Below TM_WAIT_TIME, enter the following:

      # sleep time (milliseconds) in a thread (windows only). eg SetEnv

      TM_SLEEP_TIME 100

      # this is used to yield to other threads under heavy load

      SetEnv TM_SLEEP_TIME 100

      This tells Apache to wait 1/10 of a second (100ms) before trying to find another available web listener for each request.

    • SetEnv TM_PROCESS_TIME is used to tell Apache how long it should wait for a web listener to respond with the page requested by the user before it declares the web listener hung. Most requests take under a second. Credit card Authorization requests might take 3 to 10 seconds, so a long time like 45 seconds is reasonable. Do not make it shorter than the credit card authorization time as you will get cards authorized and TM will think that they are not. If Apache detects that a web listener is hung, it send back the page 'TMsysErrorListeners.html'
  • Save any changes made
Step 21 It's now time to configure http-ssl.conf file. We'll do this by copying some data from the sample httpd-ss.conf file to the apache httpd-ssl.conf file.

NOTE: DO NOT REPLACE THE HTTPD-SSL.CONF FILE otherwise it will not work. You must copy/paste the configuration as follows

  1. Open up the conf directory in C:\BoxOffice
  2. right click on httpd-ssl and Edit the file with 'wordpad'
  3. Highlight all the text in this file and copy it

now in the httpd-ssl file in the extra directory in the Apache2.2/conf

  • open the extra directory in the Apache2.2/conf folder
  • edit the httpd-ssl file
  • scroll down the page till you find the SSL Cipher Suite lines
  • highlight the four lines for the SSL Cipher Suite
  • paste all the code you copied above over the current SSL Cipher Suite
  • save the file

Now copy both the server.crt and server.key files from the C:\BoxOffice\conf folder and paste them into the Apache2.2/conf folder

Step 22 Click on the Apache monitor icon in the lower right tray and you'll see and 'Apache 2.2 menu popup and then slide to the right and 'Restart' the server. If that causes the green triangle to go to a red square, please contact tech support as it means there is a configuration issue someplace.

Optionally, go back through the changes that were made above to the httpd.conf file and see if you can spot the mistake.

Step 23 If the restart of the server worked, then we need to test the apache server one more time
  1. Start a web browser like Internet Explorer
  2. Type 'http://localhost/TheatreManager/1/login&event=0
  3. You should see a page like the one on the right.

If so, then it means that the apache module and configuration are correct. If not, it means that you may need to remove the

C:\program Files\Apache Software Foundation

directory and start the process from the top.

Step 24 Refer to any PCI consideration for installing Apache for late breaking security patches