× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Hi Don,

The call to your CGI program is going to be based on the library in the URL, not the library list. In other words, Apache is doing a CHGLIBL to set the library list you provide, but then is doing a CALL CGILIB/YOURPGM. So the LIBL has no effect on which program is called.

Here's what I do:

ScriptAlias /cgilib /qsys.lib/CGILIB.LIB
<Directory /qsys.lib/CGILIB.LIB>
Order Deny,Allow
SetEnv QIBM_CGI_LIBRARY_LIST "QTEMP;CGILIB;QGPL;BLAH;BLAH;BLAH"
</Directory>

ScriptAlias /testlib /qsys.lib/TESTLIB.LIB
<Directory /qsys.lib/TESTLIB.LIB>
Order Deny,Allow
SetEnv QIBM_CGI_LIBRARY_LIST "QTEMP;TESTLIB;QGPL;BLAH;BLAH;BLAH"
</Directory>

The point being... if the URL contains /cgilib, it'll call my production program, and if the URL contains /testlib, it'll call my test copy. The library list for the test copy does not contain the production library (or vice-versa) since I discovered years ago that it was too easy to make mistakes that way.

Granted, if you have a lot of libraries, it might seem cumbersome to add them all to the Apache config like this. In our case, we have one test lib per developer, and we have only 3 developers, so it's not a big deal.


DSmith@xxxxxxxxxxxxxxxxxxxxx wrote:
Good morning!

I have been looking for a way to configure our Apache http server so that it will call CGI programs based on what library the program is in. I'm aware that the statement: SetEnv QIBM_CGI_LIBRARY_LIST "QTEMP;QGPL;TSTLIB;CGILIB:" can set a library list for the web server, but if I have the original version of CGIPGM1 in CGILIB and I have a test version in TSTLIB, the version in TSTLIB doesn't get called - only the old version that's in CGILIB. That's because it's calling the program based on the following statement in our httpd.conf file: ScriptAliasMatch /cgi-bin/(.*) /QSYS.LIB/CGILIB.LIB/$1.PGM - any program in the URL is going to be called from CGILIB. I cant figure out how to get a few programs in TSTLIB to be called rather than the ones in CGILIB. Is anyone aware of any method or statement that I can use that can accomplish my objective, other than creating another entire web instance? (I already have three!)

Thanks in advance,

Don

==================================
Donald W. Smith
IBM Certified AS/400 Programmer/Analyst
Microsoft Certified Professional
Information Systems Department
City of Lancaster, Pennsylvania
DSmith@xxxxxxxxxxxxxxxxxxxxx


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-2024 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.