Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CL based method for adding HTTP Servers on IBMi system

I have a need to develop a CL script to quickly deploy a web application across a set of IBMi systems.

Right now, I have everything set up where I can create the directories, deploy the configurations (with the correct modifications) and place the files all from the CL script, but I cannot get it to automatically create and start the HTTP Server.

All of the documentation I can find requires that the servers be set up through the "IBM Web Administration for iSeries interface." Which is pretty much useless if I am trying to automate the entire system.

The only CL commands I can find which are of use are STRTCPSVR and ENDTCPSVR . However, there does not seem to be a clear way to add the server to the underlying system to start it.

Does anyone know of a CL command that does this? If not, is there an object/member I can edit which would add a server to the HTTPA, set it to point to the already set up htdocs and conf directories and then I can start it with STRTCPSVR?

like image 964
Kelly John Rose Avatar asked Mar 25 '26 14:03

Kelly John Rose


1 Answers

See the Create Apache Server Instance (QzuiCreateInstance) API for a method to automate the creation of http instances.

The QzuiCreateInstance() API allows users to create a new IBM® HTTP Server for i server instance.

Also the QUSRSYS/QATMHINSTC file contains a member for every configured instance. Each member has one record that contains an entry in the format of -apache -d /www/instancename -f conf/httpd.conf. You may be able to create members and add the record without using the API.

like image 161
James Allman Avatar answered Mar 28 '26 02:03

James Allman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!