Configuring IBM HTTP Server as reverse proxy
Procedure
- Log in to the HTTP server as the root user (AIX®, Linux) or the administrator (Windows).
- Backup the current httpd.conf.
-
Open the http.conf file in a text editor. The http.conf file is typically stored in the
following location:
- AIX: /opt2/IBM/HTTPServer/
- Linux: /opt/IBM/HTTPServer/conf/
- Windows: D:\IBM\HTTPServer\conf\
-
Define the Virtual Host Reverse Proxy.
Note: Combine this with the existing VirtualHost entry.
- <VirtualHost *:443>
- ServerName [CONNECTIONS_URL]
- RewriteEngine On
- RewriteRule ^/activities/service/html/(.*)$ /boards/activities/service/html/$1 [R]
- ProxyPass "/boards" "http://[KUBERNETES_NAME]:32080/boards"
- ProxyPassReverse "/boards" "http://[KUBERNETES_NAME]:32080/boards"
- ProxyPass "/api-boards" "http://[KUBERNETES_NAME]:32080/api-boards"
- ProxyPassReverse "/api-boards" "http://[KUBERNETES_NAME]:32080/api-boards"
- </VirtualHost>
where
- [CONNECTIONS-URL] is the URL of your HCL Connections deployment
- [KUBERNETES_NAME] is the hostname/IP of the master in your kubernetes cluster
- [KUBERNETES_PORT] is the port of your Ingress Controller (32080), so make sure that is deployed and running before making these changes
For example:
- <VirtualHost *:443>
- ServerName connections.example.com
- #Kudos Boards
- ProxyPass "/boards" "http://kube-master.company.com:32080/boards"
- ProxyPassReverse "/boards" "http://kube-master.company.com:32080/boards"
- ProxyPass "/api-boards" "http://kube-master.company.com:32080/api-boards"
- ProxyPassReverse "/api-boards" "http://kube-master.company.com:32080/api-boards"
- #End Kudos Boards
- </VirtualHost>
- Save the httpd.conf file.
-
Apply the changes by restarting the HTTP server gracefully; for example:
/opt/IBM/HTTPServer/bin/apachectl graceful