Set up Reverse-Proxy HTTP Server
Set up Reverse-Proxy to Forward REST Service Requests from Apachedft HTTP Server
It is recommended to proxy all requests to the MDCMS HTTP server through the Apachedft http server on the partition because:
- no need to indicate the port number in the URL
- no need to add another port number to the firewall rules
- potentially take advantage of existing SSL configuration in the default http server
To configure the proxy:
- use WRKLNK to navigate to the /www location of the default server (usually named APACHEDFT)
- view the conf directory
- edit the httpd.conf file
- ensure the following modules are listed in the configuration. If missing then insert them into the configuration:
LoadModule proxy_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM LoadModule proxy_http_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM LoadModule proxy_connect_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM LoadModule proxy_ftp_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM LoadModule proxy_balancer_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM
- add the following 3 lines to the configuration: Replace 1901 with the port number you specified for the server mdcms is correct if the instance of MDCMS is MDCMS. If your instance is TEST for example, then replace all 4 occurrences of mdcms with mdcmstest. NOTE: mdcms in the URL is always the instance of MDCMS, regardless of the name of the server.
- save the configuration and restart the default server