Configure an Apache Web Server

Incorta recommends configuring an Apache HTTP Server with the Incorta Direct Data Platform for production deployment. There are two Apache HTTP Server configuration options:

  • As a reverse-proxy only, which redirects incoming requests to different servers for security purposes
  • As a load balancer (which will also act as a reverse-proxy) in a High Availability (HA) environment.

There are two cases for the Apache Web Server setup:

CASE 1 - If the Apache Web Server is installed on the host that runs an Incorta Node with the Analytics Service, ensure that the HTTP/S port ”80” (default) has incoming and outgoing data access. Additionally, the AJP connector port “8009” (in this case) must be free internally on this host so as to communicate between Incorta Nodes and the Apache Web Server. No incoming/outgoing data access is required.

CASE 2 - If the Apache Web Server is NOT installed on the same host that runs an Incorta Node with the Analytics Service, not only must the HTTP/S port ”80” (default) be available and have incoming and outgoing data access, the AJP connector port “8009” must also have an incoming and outgoing data access.

  • The Apache Web Server Port 80 is the default port for the Apache Web Server (if installed). It can be changed in the Apache server configuration.
  • The PhantomJS 7777 is an internal port that the Incorta Node with the Analytics Service accesses locally to enable the send-dashboard-by-email feature. No incoming and outgoing data access is required. It CANNOT be set or changed.
  • The High Availability (HA) Port 2181 is an internal port for Apache ZooKeeper to coordinate activities in an Incorta Cluster. This port requires incoming and outgoing data access. It can be set or changed, by changing the property "clientPort = 2181" found in the following path <INSTALLATION_PATH>/IncortaNode/zookeeper/conf/zoo.cfg

The configuration process:

  1. Configure the Apache HTTP server.
  2. Create a conf.dfor the incorta.conf file. This file contains the port/node configuration parameters and disables all listening ports except the AJP Connector port.
  3. Add the path to incorta.conf file HTTPD.conf file in the Apache folder.
  4. Optionally, configure the server for load balancing and reverse-proxy security.
  5. Configure the Apache Tomcat server.
  6. Enable the AJP Connector port.
  7. Restart the Apache server.

Before you start

Before starting the configuration steps, ensure that the following Apache components are installed on your system:

Mac or Linux (CentOS)

The default installation location for Mac or Linux is the /etc folder.

  1. Open a terminal.
  2. Type apachectl -v.

The response  is the server version and build:

Server version: Apache/2.4.23 (Unix) Server built: Aug 8 2016 16:31:34

Windows

The default installation location is
C:\Program Files\Apache Group\Apache2\bin\Apache.exe

Configuring the Servers

The configuration process uses the following steps:

  1. Configure the Apache HTTP Server (including the load balancing and reverse proxy).
  2. Configure the Tomcat Application Server.
  3. Restart the Apache HTTP Server.

Configuring the Apache HTTP Server

The following steps will show you how to configure the Apache HTTP Server as a reverse-proxy, and as a load balancer (which will also act as a reverse-proxy):

  1. Create a folder named conf.d to contain the <File_Name>.conf ports/nodes configuration parameters file, incorta.conf. Add the path to this file to the httpd.conf configuration file.
  2. Set up a load balancer.
  3. Set up a reverse-proxy by creating a file or use the following sample file, to include your system port parameters:

Set the Apache Server listening port, which will redirect incoming requests to the AJP connector port set below.

Listen <Port_Number> (e.g. 90)
<VirtualHost \*:<Port_Number>
<Proxy \*>
AddDefaultCharset Off
Order deny,allow`
Allow from all
</Proxy>

Set the tomcat AJP connector port number.

ProxyPass /incorta ajp://<IP_Address>:<Port_Number(e.g.8009)>/incorta
</VirtualHost>
  1. Create a file with the following configuration parameters, or use the following sample file, to include your system port parameters:
Required Modules
Create virtual host on port 7000
  Listen 7000
  NameVirtualHost *:7000
  <VirtualHost *:7000>
   ServerName <URL>
   ErrorLog <Installation_Path>/conf.d/logs/ajp.error.log
   CustomLog <Installation_Path>/conf.d/logs/ajp.log combined
   #-------------------------------------------------------
   # Reverse Proxy
   #-------------------------------------------------------
   <Proxy balancer://cluster>
    BalancerMember ajp://<IP_Address>:<Node1_AJP_PortNo> route=<Node1_Name>
    BalancerMember ajp://<IP_Address>:<Node2_AJP_PortNo> route=<Node2_Name>
   </Proxy>
   ProxyPass / balancer://cluster/ stickysession=JSESSIONID|jsessionid
    ProxyRequests Off
    <Proxy *>
        Order deny,allow
        Deny from none
        Allow from localhost
    </Proxy>
    #------------------------------------------------------
    # Balancer-manager, for monitoring
    #------------------------------------------------------
    <Location /balancer-manager>
        SetHandler balancer-manager
        Order deny,allow
        Deny from none
        Allow from localhost
    </location>
</VirtualHost>
  1. For each node, edit the server.xml file in the <Installation_Path>/server/conf/ directory to add the jvmRoute in the engine tag: <Engine name=”Catalina” defaultHost=”<IP_Address>” jvmRoute=”Node_Name”>.
  2. Edit the httpd.conf Apache Server configuration file in the Apache_Installation directory to add the <File_Name>.conf configuration file path: Include <Configuration_File_Path>