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



For CGI Programs you can use the SetEnv QIBM_CGI_LIBRARY_LIST keyword within an Apache Virtual Host file. httpd.conf

You can specify the directive at multiple levels. Here are three different examples.

Here is an example of setting the library list from within a Location directive.
Here two entry libraries are defined.

I think this example might be the closest to what you are trying to accomplish.

ScriptAlias /rest /QSYS.LIB/LIB1.LIB
ScriptAlias /test /QSYS.LIB/LIBB.LIB

<Directory /QSYS.LIB/LIB1.LIB>
SetHandler cgi-script
Options +ExecCGI
Order Allow,Deny
Allow From all
</Directory>

<Directory /QSYS.LIB/LIBA.LIB>
SetHandler cgi-script
Options +ExecCGI
Order Allow,Deny
Allow From all
</Directory>

<Location /rest/>
SetEnv QIBM_CGI_LIBRARY_LIST "LIB1;LIB2;LIB3"
</Location>
<Location /test/>
SetEnv QIBM_CGI_LIBRARY_LIST "LIBA;LIB1;LIB2;LIB3"
</Location>



Here is an example of setting the library list from within a Virtual Host.

<VirtualHost *:10088>
ServerName uniqueServerName:10088
ServerAlias uniqueServerName.domain.com
DocumentRoot /www/zendsvr6/htdocs/DEV
<Directory /www/zendsvr6/htdocs/DEV>
Options FollowSymLinks
order allow,deny
allow from all
AllowOverride all
</Directory>
SetEnv QIBM_CGI_LIBRARY_LIST "LIB1;LIB2;LIB3"
...
</VirtualHost>



Here is an example of setting the library list from within a Directory directive.

ScriptAliasMatch ^/rest/(.*) /QSYS.LIB/LIB1.LIB/$1.PGM
ScriptAliasMatch ^/test/(.*) /QSYS.LIB/LIBA.LIB/$1.PGM

<Directory /QSYS.LIB/LIB1.LIB>
SetHandler cgi-script
Options +ExecCGI
Order Allow,Deny
Allow From all
SetEnv QIBM_CGI_LIBRARY_LIST "LIB1;LIB2;LIB3"
</Directory>

<Directory /QSYS.LIB/LIBA.LIB>
SetHandler cgi-script
Options +ExecCGI
Order Allow,Deny
Allow From all
SetEnv QIBM_CGI_LIBRARY_LIST "LIBA;LIB1;LIB2;LIB3"
</Directory>


From what I've found, the web server needs to know which library the initial CGI program is in.

With the last example, that means all usages of "/rest" would always access a program in the LIB1 library.
And all usages of "/test" would always access a program in the LIBA library.
But once the program is active it will have the specified library list.

I have been unable to find a way for the Apache webserver to "search" the specified library list for the CGI program.

Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.

-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of p.Caroti
Sent: Tuesday, October 27, 2015 9:10 AM
To: web400@xxxxxxxxxxxx
Subject: [WEB400] How setup different library depending by the Url

Hi all



I would need to setup library list via http httpd.conf file depending the url content; example, if in the url I type http://myibmi/ :10068/rest/wsage.pgm I would setup a libl like LIB1;LIB2;LIB3, instead if in the url I type http://myibmi/ :10068/test/wsage.pgm I would setup a libl like LIBA;LIBC;LIB2;LIB3 . How I have to configure my httpd.conf to do that ? (If it is possible)



Thanks in advance



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


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.