HTTP Server config library list

Discussions related to HTTPAPI (An HTTP Client Package for RPG programming.) http://www.scottklement.com/httpapi/
Post Reply
gio.cot
Posts: 16
Joined: Sat May 28, 2022 9:08 pm

HTTP Server config library list

Post by gio.cot »

hi all
until today in our Web Server config, we have insert thsese directives:
ScriptAliasMatch ^/rest/(.*) /QSYS.LIB/MYLIB.LIB/$1.PGM
<Directory /QSYS.LIB/MYLIB.LIB/>
Order allow,deny
Allow from all
SetEnv QIBM_CGI_LIBRARY_LIST "QTEMP;TESTLIB;MYLIB"
</Directory>
doing some test/debug, we have discovered that "MYLIB" is setted as *current library and so, if we have the same program either in TESTLIB and in MYLIB, also if SetEnv QIBM_CGI_LIBRARY_LIST has setted TESTLIB before MYLIB, the program that run is always that in MYLIB .
questions:
1) wich is the directive that set MYLIB as *current lib ? (pheraps ScriptAliasMatch ^/rest/(.*) /QSYS.LIB/MYLIB.LIB/$1.PGM ??)
2) as i would like continue to avoid the need for editing the Apache configuration each time you want to
add a new API., which workaround i can put in practice ?
Thanks in advance
Gio
Scott Klement
Site Admin
Posts: 975
Joined: Sun Jul 04, 2021 5:12 am

Re: HTTP Server config library list

Post by Scott Klement »

This question has nothing to do with HTTPAPI. It is about configuring the IBM HTTP Server (powered by Apache.)

With the Apache server, this is the default behavior... it always sets the library containing the program you call as the current library.

You could try adding a line like this:

Code: Select all

SetEnv QIBM_CGI_CHANGE_CURLIB N
Post Reply