|
An alternate method for configuring Apache to run Vortex scripts by
extension (.vs) is to have Apache execute the scripts directly,
instead of using a redirect handler. This method is less desirable
than the redirect-handler method (above) for several reasons:
- The Vortex scripts must exist in the web server document root,
not Vortex's
ScriptRoot. This means the document root
must be writable by the texis or CGI user (for .vtx
compilation), and the script sources are accessible to users
(though it may be possible to configure the web server to prevent
the latter). - Every script must be edited to contain a
#!/usr/local/morph3/bin/texis prefix at the start. - Every script must be have its execute bits set via
chmod.
However, this alternate procedure may be used if the preferred
redirect-handler method is not possible or practical for some reason.
Consult your web server manual (or online at
http://www.apache.org/) for details and consequences on the
directives used in this procedure:
- Open the Apache configuration file (typically
/etc/httpd/conf/httpd.conf; see your web server manual)
with a text editor. - Find the
<Directory ...> directive that applies to the
same directory as the DocumentRoot directive.
This is typically (but not always) <Directory /var/www/html>. - Inside this
<Directory ...> directive, add
ExecCGI as an option to the Options directive. - Outside the directive (ie. the line after
</Directive>),
add this line:
AddHandler cgi-script .vs - Save the configuration file and exit the editor.
- Copy all Vortex scripts you wish to run from the Web by this
method, from
ScriptRoot to the same dir under document
root. (This step is not needed if for some reason you have
edited your Vortex conf/texis.ini file and set
ScriptRoot to %DOCUMENT_ROOT%.) For example,
the dowalk.vs and search.vs scripts in
/usr/local/morph3/texis/scripts/webinator should be
copied to the /var/www/html/webinator directory (create
it if needed), assuming your Apache DocumentRoot is
/var/www/html. - Edit every script you copied in the previous step with a text
editor, and add this line as the very first line in the file:
#!/usr/local/morph3/bin/texis
(If your Webinator install directory is not
/usr/local/morph3, change it appropriately.)
This step and the next are needed even if ScriptRoot is
%DOCUMENT_ROOT%. - Run
chmod a+rx on every script you copied and edited. - Re-start the web server (typically with
/etc/init.d/httpd restart; check your web server
manual).
Note that if you are running Apache for Windows, you may also need to
set or edit the ScriptInterpreterSource directive; see your
web server manual.
Copyright © Thunderstone Software Last updated: Thu Dec 22 14:38:01 EST 2011
|