• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Guru: Serve Web Pages Safely Using A Reverse Proxy

    July 23, 2018 Alan Seiden

    If you are hosting a website or API from your IBM i server, but wish to reduce your worry about allowing access from the Internet, we often recommend a reverse proxy (or “gateway”) server. An industry-standard solution, a reverse proxy server acts as a layer of safety between your production server and your firewall. On IBM i, the IBM HTTP Server (powered by Apache) for i can act as a reverse proxy server, so there’s nothing additional to install.

    While there are several ways to set it up, one approach is to put the reverse proxy or gateway in a special IBM i partition situated in your network’s “demilitarized zone” (DMZ), open to the Internet, while your production server sits safely behind it in your private intranet. The reverse proxy pulls appropriate content from your production web server and displays the content to users.

    Alternatives include appliances such as Symantec’s Blue Coat proxy and cloud-based gateways such as cloudflare.com.

    To configure a reverse proxy server under IBM i, follow these steps:

    1. Ask your administrators to set up (or make available to you, if one exists already) an IBM i logical partition in your network’s DMZ. The partition won’t need much in the way of resources.

    Also ask for the internal IP address of your server that will be protected. For our example, say it’s 192.168.0.200.

    1. Create an Apache instance in your DMZ partition. Name it something like GATEWAY. Instructions for creating the instance are on this page: https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.5.5/com.ibm.websphere.installation.nd.iseries.doc/ae/tins_is_ihsnew.html

    You may wish to add additional features, such as SSL support, to your instance. SSL instructions: http://www-01.ibm.com/support/docview.wss?uid=nas8N1018776

    1. Edit this gateway instance so that it functions as a reverse proxy server. You’ll need to edit the appropriate Apache instance configuration file. Its location will depend on your web server instance name. For example, if your Apache instance is named GATEWAY, then the file is likely to be located at /www/gateway/conf/httpd.conf. This is a simple text file, so you may choose from several editors: IBM’s HTTP Server Admin GUI at port 2001 (if *ADMIN is started), the WRKLNK/EDTF command, or your favorite text editor.

    Add the following directives to httpd.conf’s main section (pound signs are comments):

    LoadModule proxy_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM 
    LoadModule proxy_http_module /QSYS.LIB/QHTTPSVR.LIB/ZSRCORE.SRVPGM
    LoadModule proxy_connect_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM
     # URL path / will pull content from server 192.168.0.200.
     
     ProxyPass http://192.168.0.200/
     ProxyPassReverse http://192.168.0.200/
     
    
    1. Use the Start TPC/IP Server (STRTCPSVR) CL command to restart your Apache instance (in this case, “GATEWAY”).
    STRTCPSVR SERVER(*HTTP) RESTART(*HTTP) HTTPSVR(GATEWAY)
    
    1. Now your website should be accessible to the public through the gateway server’s address.

    An IBM Champion and founder of Seiden Group, Alan Seiden leads a team that mentors clients in building APIs and web/mobile applications using open source, PHP, Python and IBM i business logic. Alan’s passion for the IBM i community inspires him to host the bi-annual CIO Summit and offer a free monthly tips newsletter.

    RELATED STORIES

    Creating and configuring HTTP server instances on IBM i

    Enable Apache HTTP for SSL

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: 400guru, API, FHG, Four Hundred Guru, IBM i, SSL, TPC/IC

    Sponsored by
    New Generation Software

    “Fixing Your Data Supply Chain”

    FREE Webinar

    You’ve optimized your business processes, products and services, but is there still a logistics gap between your data and your managers and analysts?

    See how NGS-IQ simplifies query, reporting, data visualization, and analytics tasks. Enjoy Microsoft 365 integration, multidimensional modeling, built-in email, and FTP – with IBM i security and performance.

    October 23, 2025, 11am Pacific/2pm Eastern

    RSVP: https://ngsi.news/chain

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    The Frustration Of Not Knowing How We Are Doing Outsourcing Comes Back Home

    2 thoughts on “Guru: Serve Web Pages Safely Using A Reverse Proxy”

    • Alan Seiden says:
      January 27, 2025 at 11:23 pm

      There is a typo. The second “QZSRCORE” is missing its “Q.”

      Reply
    • Alan Seiden says:
      January 29, 2025 at 11:11 am

      Sorry, another typo. We were missing the path (a slash) on two directives. Correct directives:
      ProxyPass / http://192.168.0.200/
      ProxyPassReverse / http://192.168.0.200/

      Reply

    Leave a Reply Cancel reply

TFH Volume: 28 Issue: 48

This Issue Sponsored By

  • Fresche Solutions
  • ARCAD Software
  • RPG & DB2 Summit
  • Computer Keyes
  • WorksRight Software

Table of Contents

  • Db2 For i Innovation: Expect The Unexpected
  • Outsourcing Comes Back Home
  • Guru: Serve Web Pages Safely Using A Reverse Proxy
  • The Frustration Of Not Knowing How We Are Doing
  • IBM Sunsets Big Iron Power8 Engines As Power9 Engines Loom

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Positive News From The Kyndryl Mainframe Modernization Report
  • NAViGATE, inPower 2025 On Tap for September 2025
  • Guru: WCA4i And Granite – Because You’ve Got Bigger Things To Build
  • As I See It: Digital Coup
  • IBM i PTF Guide, Volume 27, Number 37
  • AI Is Coming for ERP. How Will IBM i Respond?
  • The Power And Storage Price Wiggling Continues – Again
  • LaserVault Adds Multi-Path Support To ViTL
  • As I See It: Spacing Out
  • IBM i PTF Guide, Volume 27, Numbers 34, 35, And 36

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle