Scripting

Scripts in One Directory...


ScriptAlias [short-cut-name] [/path/to/scripts] dev.leistware.com/cgi/ScriptToExecute.pl

Use the ScriptAlias directive to channel all requests to a specific directory for executing scipts. ScriptAlias creates a token for referencing a different and often longer path. Use the ScriptAlias directive to tell apache where the scripts are. In essence ScriptAlias creates a shortcut to a set of scripts.

Use the short-cut-name in the URL to access the scripts in the cgi directory. For example: I have a script alias that uses the name i.e. shor-cut-name of cgi. Therefore, the path I use to access the scripts is

Use ScriptAlias when you want to have all scripts in a directory for easier control.

The Catch: Apache will try to execute every file in the directory identified by the ScriptAlias directive when it's called by a url.

CREATED 2017-05-02 23:41:03.0

00-29-DD

UPDATED 2017-05-03 02:15:48.0

Scripts in Several Directories...


AddHandler cgi-script .pl .cgi <Directory /looser/cgi-bin>
   Options +ExecCGI
</Directory>

To run specific scripts from a directory or directories there are two things to remember.

  • First - a handler must be added with the AddHandler directive.
  • Second - allow scripts to be executed in the directory with the Options directive.

The AddHandler directive takes at least two arguments. Frist is the keyword cgi-script and the remaining parameters are the file extentions for apache to execute.

Now any file with the extention of .pl and .cgi will be executed.

The second thing is to add ExecCGI as an argument to the Options directive...

...for any directory you want to have scripts executed in.

CREATED 2017-05-03 01:29:08.0

00-29-DE

UPDATED 2017-05-03 02:15:50.0

Knowledge

Perl
L
I
N
K
S

DBID: db.wam

Page Server: Ruger

©2012 Leistware Data Systems

      Hello anonymous