NGINX install

There is a recent post from Jesse Grozinski A-Tale-of-Two-Web-Servers which gives some information about the addition of NGINX to the IBM i suite of HTTP Servers. We feel that the post needed a little more detail for those of us who are less knowledgeable about the underlying structure to make it easy to understand and install. So here is a quick round up of what we did to get the ‘basic’ install done.

The NGINX server has a few dependencies which need to be installed at the same time, all of these are covered by previous PTF’s so we used the Fix Central Option to download the PTF’s to our system directly, this ensures we have all of the pre-req’s installed. As per Jesse’s post there are 3 PTF’s which hold the new content to be installed (SI64951, SI63663, and SI62570). At the time of this post the updated group PTF (SF99123, SF99223, or SF99225, depending on IBM i release) level 4 was not available in fix central, when it is you can download it to get the latest and greatest.

Load the PTF’s and apply using the IBM i commands.



The install locations for IBM i Open Source options are not same same (at the moment?) as other Linux based installs so if you look at the NGINX documentation online you will not find the files required to set things up. The install location for NGNIX is  ‘/QOpenSys/QIBM/ProdData/OPS/tools’ so all the relevant directories are based off that.

The NGINX server default config file is located in the conf directory relevant to the location above and is called nginx.conf. Use your favorite editor and update that file to reflect the port you want to have it listen on and set the number of worker jobs (these are used to respond to client requests so in the beginning for testing you can leave the default or increase slightly). We changed the line ‘worker_processes  1; to worker_processes  5; plus changed the line  
listen 80; to listen 1984; (Jesse’s entry shows the port 1984 so we stuck with it).

Now we can start the server. The nginx binary to start the server is located in ‘/QOpenSys/QIBM/ProdData/OPS/tools/bin’. You can change the directory to that directory or invoke using the full path ‘/QOpenSys/QIBM/ProdData/OPS/tools/bin/nginx’. Once this is done you can check for the running services using the ps commad in PASE.  ‘ps -Af | grep nginx’ (the documentation online shows a different command which has options not available in the PASE version of ps.). When run your should see the following or similar based on the settings you used in the nginx.conf.
‘bash-4.3$ ps -Af | grep nginx
chrish 983 1 0 17:03:41 – 0:00 nginx
chrish 995 983 0 17:09:06 – 0:00 nginx
chrish 996 983 0 17:09:06 – 0:00 nginx
chrish 997 983 0 17:09:06 – 0:00 nginx
chrish 998 983 0 17:09:06 – 0:00 nginx
chrish 999 983 0 17:09:06 – 0:00 nginx’
You should now be able to connect to the server using a browser and see the follwoing.

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to
Commercial support is available at

Thank you for using nginx.’

Now we can start to play with all of the nice new options NGINX will offer to IBM i users.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.