Configuring a Proxy
The configuration of 3rd party software i.e. Operating Systems, Databases, Application Server, etc., in the context of this documentation is for illustration purposes only. iGrafx doesn't imply that the provided examples are the best or only way of configuration for the described scenario. Nor can we guarantee that it is the best option for performance and security. You apply the instructions at your own risk, please consult an expert of the 3rd party software if you are not sure.
A proxy can be very useful for preventing exposure of the application server nodes and instances to the internet. The main reason for a proxy in this case is to make the application available via an URL defined by a DNS entry made by your network administrator and to route the default http port 80 to the network port the web server is actually using.
These instructions cover using Apache to set up a simple HTTP proxy, in three steps:
- Install Apache.
- Create a configuration file.
- Enable the configuration.
Although this example uses an Apache proxy, you can use any other proxy or network routing solution by adapting the settings appropriately. Your network administrator can help you with identifying the required options for your infrastructure.
If you installed a pre-deployed iGrafx platform on Linux using Tomcat, be sure to also follow the instructions in Configure Tomcat for Use with a Proxy.
Install Apache
Install Apache and the required modules on your operating system, then enable the proxy
and proxy_http
modules
Create a Configuration File
Create a virtual host configuration file.
Copy the following template into the file. You must change the ServerName, ProxyPass, and ProxyPassReverse values to fit your requirements. It is recommended that you also set a VALID ServerAdmin email address.
You need to make sure you provide the correct IP and Port for your instance. Depending on the installation scenario, your port may be different than 8080. You can discover the port through the admin browser, by accessing the server instance. Go to the Properties tab to see the values for HTTP_LISTENER_PORT.
<VirtualHost *:80>
ServerAdmin name@yourcompany.com
ServerName PUT_YOUR_DNS_NAME_HERE
ProxyRequests Off
ProxyPreserveHost Off
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error_proxy.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access_proxy.log combined
</VirtualHost>
Enable the Configuration
Make sure the configuration file is either explicitly included or included through wildcard imports from your Apache configuration. Then restart or reload Apache.
Configure Tomcat for Use with a Proxy
These instructions apply only to pre-deployed iGrafx platform installations using Apache Tomcat.
When Tomcat is used as the iGrafx Platform application server, it needs to be configured to be aware of the proxy server. If you set up a proxy (Apache or otherwise), you need to make changes to the server.xml file located in the conf directory of your Tomcat server.
In the server.xml file, find the following connector port settings
<Connector port="${igrafx.http.port}" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
Change them as shown below when using no SSL, making sure you put in the correct values for proxyName
and proxyPort
based on your Apache configuration:
<Connector port="${igrafx.http.port}" protocol="HTTP/1.1"
connectionTimeout="20000"
proxyName="PUT_YOUR_DNS_NAME_HERE"
proxyPort="80"
redirectPort="8443" />
Or like this when using SSL, making sure you put in the correct values for proxyName
and proxyPort
based on your Apache configuration:
<Connector port="${igrafx.http.port}" protocol="HTTP/1.1"
connectionTimeout="20000"
proxyName="PUT_YOUR_DNS_NAME_HERE"
proxyPort="443"
scheme="https"
secure="true"
redirectPort="8443" />
After making these changes, be sure to restart Tomcat.
When using proxy, be aware that long running tasks such as registering a repository in iGrafx Platform can cause proxy timeout errors to appear. Adjust proxy timeout accordingly.