Gio,

Try adding the following directive and see if that keeps it from changing the current library.

SetEnv QIBM_CGI_CHANGE_CURLIB N

If you want to call an api in a different library, you will need to add another Script alias match statement pointing to a different library. This might also require you to use a different url to call it. Only the initial program is hard coded to be in a certain library in the configuration file. Any programs called from the initial program would use the library list.

Dean Eshleman
Software Development Architect, Everence(r)

P: (574) 533-9515 | TF: (800) 348-7468 | W: everence.com<http://www.everence.com/>
1110 North Main Street, PO Box 483, Goshen, IN 46527

From: WEB400 <web400-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of gio.cot via WEB400
Sent: Thursday, February 19, 2026 9:25 AM
To: web400@xxxxxxxxxxxxxxxxxx
Cc: gio.cot <gio.cot@xxxxxxxxxxx>
Subject: [EXTERNAL] [WEB400] Help with HTTP Server config library list

This email originated outside of Everence. Do not click links or attachments unless you recognize the sender.

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



--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx<mailto:WEB400@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400<https://lists.midrange.com/mailman/listinfo/web400>
or email: WEB400-request@xxxxxxxxxxxxxxxxxx<mailto:WEB400-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400<https://archive.midrange.com/web400>.

Confidentiality Notice: This information is intended only for the individual or entity named. If you are not the intended recipient, do not use or disclose this information. If you received this e-mail in error, please delete or otherwise destroy it and contact us at (800) 348-7468 so we can take steps to avoid such transmission errors in the future. Thank you.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.