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:
- Configure the Apache HTTP server.
- Create a
conf.dfor
theincorta.conf
file. This file contains the port/node configuration parameters and disables all listening ports except the AJP Connector port. - Add the path to
incorta.conf
file HTTPD.conf file in the Apache folder. - Optionally, configure the server for load balancing and reverse-proxy security.
- Configure the Apache Tomcat server.
- Enable the AJP Connector port.
- 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.
- Open a terminal.
- 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:
- Configure the Apache HTTP Server (including the load balancing and reverse proxy).
- Configure the Tomcat Application Server.
- 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):
- 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 thehttpd.conf
configuration file. - Set up a load balancer.
- 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 OffOrder 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>
- Create a file with the following configuration parameters, or use the following sample file, to include your system port parameters:
Required ModulesCreate virtual host on port 7000Listen 7000NameVirtualHost *:7000<VirtualHost *:7000>ServerName <URL>ErrorLog <Installation_Path>/conf.d/logs/ajp.error.logCustomLog <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|jsessionidProxyRequests Off<Proxy *>Order deny,allowDeny from noneAllow from localhost</Proxy>#------------------------------------------------------# Balancer-manager, for monitoring#------------------------------------------------------<Location /balancer-manager>SetHandler balancer-managerOrder deny,allowDeny from noneAllow from localhost</location></VirtualHost>
- For each node, edit the
server.xml
file in the<Installation_Path>/server/conf/
directory to add thejvmRoute
in the engine tag:<Engine name=”Catalina” defaultHost=”<IP_Address>” jvmRoute=”Node_Name”>
. - Edit the
httpd.conf
Apache Server configuration file in theApache_Installation
directory to add the<File_Name>.conf
configuration file path:Include <Configuration_File_Path>