ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

How setup different library depending by the Url

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Re: How setup different library depending by the Url

    Usually people do this based on the library, so something like this:

    Code:
    ScriptAliasMatch /rest/([A-Z0-9]+)/.* /qsys.lib/RESTLIB.LIB/$1.pgm
    <Directory /qsys.lib/RESTLIB.LIB>
       order allow,deny
       Allow from all
       CGIConvMode %%EBCDIC/MIXED%%
       SetEnv QIBM_CGI_LIBRARY_LIST "LIB1;LIB2;LIB3"
    </Directory>
    
    ScriptAliasMatch /test/([A-Z0-9]+)/.* /qsys.lib/TESTLIB.LIB/$1.pgm
    <Directory /qsys.lib/TESTLIB.LIB>
       order allow,deny
       Allow from all
       CGIConvMode %%EBCDIC/MIXED%%
       SetEnv QIBM_CGI_LIBRARY_LIST "LIBA;LIBB;LIBC"
    </Directory>
    It can be done by URL instead of library, using <Location> instead of <Directory>

    Comment

    Working...
    X