Series AS4. 00 Tips Tricks. Q. I wish I fully understood all those Alias and Script. Alias. Match lines, though. Alias, Alias. Match, Script. Alias and Script. Alias. Match arent too hard to. Ill try to explain them, but please ask questions if you. When you configure Apache, you give it a Document. Root. This is an IFS. In the simplest. configuration, everything on your server would be under Document. Root. So you might have this. Document. Root wwwmyserverhtdocs. HTTP was designed for fetching documents originally, thats all you. So a browser would code. This tells the browser a use the http protocol. Apache will get that request, but itll add the Document. Root to it. So. the actual IFS path to the document will be. Thats the simplest behavior. It lets you designate some part of your. IFS Document. Root where all subfolders will be accessible via URLs. Thats the basic configuration. What if you want something OUTSIDE of that area to be accessible to the. How would you do it You declare an Alias. Document. Root wwwmyserverhtdocs. Q Is there a relatively easy way to retrieve the number of active jobs in a pool in my case I want to track number of jobs in SHRPOOL1 A I took one of the. Experts Exchange Questions How can I get a list of all the Groups a User is a Member of in Active Directory using using VBA Im having a permissions problem while running a. vbs script. The script is to add new user accounts from an receptionists computer. The script gets hung up on the. Alias foo homescottbar. This says that all URLs go under wwwmyserverhtdocs, just as in the. EXCEPT for foo. Any URL starting with foo will. So this works just as it did before. But this works differently. In this second case, the foo is an alias for homescottfoo, so the. URL points to homescottbarmydirmydoc. Thats all an alias does. It provides a way to specify directories in. URL that are redirected to another area of the IFS, outside of the. Alias. Match does the same thing that Alias does, except it allows. Regular Expressions. For example, I could. Alias. Match foo. pg imagesjpgfoo1. In a regular expression, a single dot matches any one character. An. asterisk says zero or more of the preceding character. So when you. have. it matches any number of any character. In this example, any. URL that begins with foo and ends with jpg will match the alias. In Apache, the parenthesis designate a section of the URL o be copied to. URL. So in this example, the foo is not in parenthesis. So whatever matches the wildcard of. pg will be. Youll notice the result is. Once the hostname is removed, it starts with foo and ends with jpg, so. Alias. The. pg part will match. Apache will access the. IFS. FWIW, I tend to avoid Alias. Match or Script. Alias. Match since they run. IMHO, theyre more complicated than I need for my projects. If you understood Alias, then Script. Alias should be easy. Theres. really only one difference. Alias is for fetching a document. Apache which document in the IFS to fetch. By contrast. Script. Alias is for running a script or program. Instead of downloading. Alias would do. Script. Alias tells Apache to run the program. The output of the program. Without Script. Alias. Document. Root wwwmyserverhtdocs. This tells Apache to go to the wwwmyserverhtdocsqgpl directory and. With Script. Alias. Document. Root wwwmyserverhtdocs. Script. Alias qgpl QSYS. LIBQGPL. LIB. http www. Hopefully you already understand that QSYS. LIB in the IFS provides. With that in. mind, Apache will build the IFS pathname of. QSYS. LIBQGPL. LIBPMU0. PGM and it will therefore be equivalent of. CALL PGMQGPLPMU0. SCRIPTALIASMATCH. Same as Script. Alias, except it now has regular expressions wildcards. Script. Alias. Match is to Script. Alias what Alias. Match is to Alias. The installer for CGIDEV2 likes to set things up like this. Script. Alias. Match mylibp. Alias. Match mylibh. QSYS. LIBMYLIB. LIBHTMLSRC. FILE1. mbr. Alias mylibh QSYS. LIBMYLIB. LIBHTMLSRC. FILE. Alias mylib mylib. The Script. Alias. Match at the top says that any URL that begins with. Contrast these two statements. Script. Alias mylibp qsys. Script. Alias. Match mylibp. In the first case, anything that starts with mylibp including files. QSYS. LIBMYLIB. LIB library. Of course, if you list a program object, no. If you list a non program object, however. Apache will still try to call it though, itll fail with an error. In the second case, only URLs that end in. PGM are called. Apache will. Therefore, non programs will not match this script alias. Instead. theyll match this one also from the configs, above. Alias mylib mylib. This tells it to go to the mylib folder of the IFS instead of the. So program objects go to the library, non program objects go. IFS folder. If you left off this extra Alias, it would go to the. Document. Root instead and go to wwwmyserverhtdocsmylib. Shrug. I personally prefer to go in and delete the CGIDEV2 provided. I dont like the instructions they. Theyre more complicated than they need to be, IMHO. But, anyway. hope this all made sense.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2017
Categories |