You are here

Mac Apache Server

Subscribe to Syndicate

Theatre Manager does not use the Apple version of Apache. It is often behind in versions and is configured specifically for how Apple Corp. likes things. Instead, Theatre Manager uses a vanilla version of Apache taken directly from the turn off airport and other energy saving preferences or time wasting applications in this link.

  • Upgrading Apache from an earlier version is the similar to installing it. The following additional steps are required:
    • Stop all web listeners
    • Navigate to the /Library/Apache2 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 /Library/Apache2 with the conf folder you saved on your desktop
    • Start Apache and your web listeners
  • General Installation Steps

    Step Purpose
    Step 1

    apacheDownload the latest installer using TMApacheSetup.zip.

    It should automatically be placed into the software download folder and, depending on your settings, it may extract automatically. If it does not, then double click on the TMApacheSetup.zip file and it should create an executable 'TMApacheSetup.app' file like the image to the right.

    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 You will be asked to authenticate the installer. Please type the user name of a person with administrative rights to this machine along with the password.

    Step 4 When you see the splash screen, please click continue.

    Step 5 Click continue on the license page. Feel free to read it if you wish.

    Step 6 When the confirmation appears indicating that you have read the licence, please click 'Agree'

    Step 7 You are now ready to install Apache on the mac. Click the Install button

      The progress bar will monitor the installation process.

    Step 8 When the end of the install occurs, click the 'quit' button.

    Testing and Configuration Steps

    Step 9 To begin the process of configuring Apache:

    • Go to the Apple menu
    • Open the system preferences
    • and click on the 'TM Apache' icon
    NOTE: if you see an old icon with a blue feather labeled 'apache' in the control panels in addition to the new one, please right click on it and delete it.
    Step 10 If the Apache preference pane does not open to the 'Status', tab, click the status tab.

    1. Click on the 'Start' button. You may be asked to enter the password of a user with administrative rights.
    2. The 'status' should change to 'Running' in the middle of the screen. If it does not, then click the 'Start' button one more time and the status should change to 'Running'. It is fairly common to have to start the server twice.
    Step 11 Test the server to see if it starts out of the box
    1. Start a web browser like Safari
    2. Type 'http://localhost/apacheindex.html
    3. The page should respond with 'It Works!' as per the picture on the right. If it does not respond like this, or it spins forever, then possible problems are:
      • You did not stop the build in OSX Apache web server
      • You need to open Ports 80 (and 443) on this machine
      • You need to restart the computer.

    Step 12

    We are now ready to configure the server for security and behaviour related items

    1. Click on the 'Configuration' tab of the Apache2 System Preference pane.
    2. Click on the 'Edit' button at the top right to edit the main Apache configuration file. You want to be very careful editing this because an invalid config file will prevent Apache from starting up.
    3. A window will pop up showing the 'httpd.conf' file.
    4. Scroll to the very bottom of the file and 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.
    5. There are two other environment variables you may wish 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 that this value be no more than 10.
      • 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 2 or 3 seconds (Orbital) or 3 to 10 seconds (PC Charge), 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'
    6. Save the Changes to the httpd.conf file and close it.
    Step 13

    We are now ready to configure the httpd-ssl file.

    1. Click on the 'Configuration' tab of the Apache2 System Preference pane.
    2. Click on the 'Edit' button for the SSL Configuration at the middle right to edit the SSL configuration file. You want to be very careful editing this because an invalid config file will prevent Apache from starting up.
    3. A window will pop up showing the 'httpd-ssl.conf' file.
    4. in that file, you will see the servername and email address near the top of the file.
    5. Set the servername (for example, tickets.yourvenue.org) to the ticketing domain name for your apache server.
    6. Set the email address for the primary contact person for web activity.
      Step 14 Restart Apache2

      • Click on the 'Status' tab of the system preference
      • Click 'Start' if the server was not running
      • Click 'Restart' if the server was running and just needs rertarted to obtain the latest configuration changes.

      When the status says 'running' you can go on to the next step. If it is not running check the changes you made to find the issue.

      Step 15

      If the restart of the server worked, then we need to test the apache server one more time

      1. Start a web browser like Safari
      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

      /library/Apache2

      folder and start the process from the top.

       

      Step 16 Refer to any PCI consideration for installing Apache for late breaking security patches
      Step 17 Make sure to turn off airport, ensure there is a monitor, and deal with other power saving features.