Apache HTTP Server installation and configuration

Installation Manager installs and configures Apache HTTP Server as the web server for Build Forge. Using the provided Apache HTTP Server is the quickest way to configure a web server for Build Forge.

As an alternative to the standard configuration, you can configure an existing Apache HTTP Server instead of the one installed and configured by Build Forge. The instructions provided assume that you have experience setting up and configuring Apache HTTP Server on your operating system.

To use your existing Apache HTTP Server, modify your installation as follows:

  1. Modify your Apache HTTP Server configuration file (httpd-vhosts.conf) to point to the Build Forge application.
  2. Install PHP and configure the PHP modules required for the Apache HTTP Server, your Build Forge database, and password encryption if you want to use this security feature.
  3. Configure Apache for your database.

Install Build Forge using Installation Manager

In Installation Manger, at the Application and Web Server Configuration page, select Yes at the Supply your own web server prompt.

Prerequisite software

  • Apache HTTP Server 2.2.4
  • PHP 5.2.4

Edit the Apache server configuration file

  1. Locate the Apache http-vhosts.conf file in the extras directory of your server installation.
    cd <apache-dir>/conf/extras/
    vi httpd-vhosts.conf
  2. Edit the Apache http-vhosts.conf file. To add information about Build Forge to httpd-vhosts.conf, add the following lines:
    <VirtualHost *:80>
      ServerAdmin build@yourdomain.com
      DocumentRoot /opt/buildforge/webroot/public
    	 ServerName ausbuild01.yourdomain.com
      ServerAlias build.yourdomain.com mc.yourdomain.com 
      ErrorLog logs/ausbuild.error_log
      CustomLog logs/ausbuild.access_log common
    </VirtualHost>
  3. Modify the DocumentRoot setting to point to the Build Forge web application. In the example, the Build Forge installation directory is /opt/buildforge.
  4. Leave the port as 80 or change it to the port you run the Apache HTTP Server on locally.

    <VirtualHost *:80>

    Important: Do not use port 8080; it is the default port for Apache Tomcat.
  5. Modify any other settings in http-vhosts.conf as required for your Apache HTTP server:
    • ServerAdmin: email address of the Build Forge administrator
    • DocumentRoot: location of the entry page for the Build Forge application
    • ServerName: server where the Build Forge application is installed
    • ServerAlias: optional aliases for the Build Forge ServerName URL
    • ErrorLog: Apache error log for the Build Forge application
    • CustomLog: Apache error log for logging access to the Build Forge application

Install and configure PHP for the Apache HTTP Server

PHP is not installed with the Apache HTTP Server. You must install PHP 5.2.4 and configure it to point to the httpd-vhosts.conf for the Apache HTTP Server.

Install and configure PHP for your Build Forge database

During PHP installation, select and install the PHP extensions for the database type that you are using as the Build Forge database.

(Optional) Configure the PHP OpenSSL module to support password encryption

To support SSL, Build Forge uses the PHP OpenSSL module. This support is provided with PHP 5.2.4; no additional configuration is required.

To support password encryption, some additional configuration is required. PHP 5.2.4 is required to support this configuration. You must locate the patch files for the OpenSSL extension, install them in the OpenSSL directory and recompile PHP, as follows:
  1. Locate the php_openssl.h and openssl.c patch files in the misc directory, located in the Build Forge installation directory, for example:
    Windows C:\Program Files\\Build Forge\misc
    UNIX/Linux /opt/buildforge/Platform/misc
  2. Copy the patch files to the openssl directory, located in the Build Forge installation directory.
  3. Compile PHP using the --with-openssl=<path_to_openssl> configure option, where <path_to_openssl> is the Build Forge openssl directory.

Configure Apache for your database

You need to add specific information to httpd.conf, depending on your database.

Apache configuration for DB2
  1. Add the following line to the beginning of the Apache startup script (normally /etc/init.d/httpd or /etc/init.d/apache2, depending on your distribution).
    source /home/db2bf/sqllib/db2profile
  2. Add the following lines to httpd.conf:
    PassEnv LD_LIBRARY_PATH
    PassEnv CLASSPATH
    PassEnv LIBPATH
    PassEnv VWSPATH
Apache configuration for MySQL

No additional configuration is required.

Apache configuration for Oracle
  1. Add the following lines to httpd.conf:
    PassEnv LD_LIBRARY_PATH
    PassEnv NLS_LANG
    PassEnv ORACLE_HOME
    PassEnv ORA_NLS
    PassEnv ORA_NLS32
    PassEnv TNS_ADMIN
    
  2. Add the following lines to the script that starts Apache at boot time (commonly /etc/init.d/httpd or /etc/init.d/apache2) and provides values for the following settings.
    export LD_LIBRARY_PATH=<value>
    export NLS_LANG=<value>
    export ORACLE_HOME=<value>
    export ORA_NLS=<value>
    export ORA_NLS32=<value>
    export TNS_ADMIN=<value>
    

Start Apache HTTP Server

Before you start the Build Forge engine and start the Management Console, start your Apache HTTP Server.