Alternate Method: Direct Execution

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 .vsc 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 https://www.apache.org/) for details and consequences on the directives used in this procedure:

  1. Open the Apache configuration file (typically /etc/httpd/conf/httpd.conf; see your web server manual) with a text editor.

  2. Find the <Directory ...> directive that applies to the same directory as the DocumentRoot directive. This is typically (but not always) <Directory /var/www/html>.

  3. Inside this <Directory ...> directive, add ExecCGI as an option to the Options directive.

  4. Outside the directive (i.e. the line after </Directive>), add this line:
    AddHandler cgi-script .vs

  5. Save the configuration file and exit the editor.

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

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

  8. Run chmod a+rx on every script you copied and edited.

  9. 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: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.