3.2. Configuring Apache for the Eszter SB Application Engine

[<<<] [>>>]

You can use the Eszter SB Application Engine together with the Apache server. The reason to do this is that the engine is not a general purpose web server, like Apache. You want to have static pages, run Perl cgi scripts, PHP programs. These are not provided by the Eszter SB Application Engine. Therefore you need Apache.

Having Apache on your webserver you have two choices how to run ScriptBasic CGI programs.

These are standard modules, which are not compiled and configured with the default Apache installation. However they are needed by many installations and thus the Apache documentation contains examples how to compile and install Apache including these modules.

Once you successfully installed Apache including this module you have to alter the configuration file to tell Apache how to use these modules. To have the modules loaded into Apache you should have the two lines in your configuration file uncommented:

LoadModule proxy_module /usr/lib/apache/1.3/mod_proxy.so
LoadModule rewrite_module /usr/lib/apache/1.3/mod_rewrite.so

The actual path to the shared object files may be different. After the modules are configured you have to tell Apache that all URLs that have the file extension .bas should be proxy to the Eszter SB Application Engine. As an example I include here the lines of the configuration of my Linux station.

ServerAdmin webmaster@scriptbasic.com
DocumentRoot /home/verhas/scriptbasic
ServerName www.scriptbasic
ServerAlias scriptbasic
ErrorLog /var/log/apache/scriptbasic/error.log
TransferLog /var/log/apache/scriptbasic/access.log
ScriptAlias /cgi-bin/ /home/verhas/scribas/
Alias /doc/ /home/verhas/scriptbasic/doc/
RewriteEngine on
RewriteLog /var/log/apache/rewrite.log
RewriteLogLevel 9
RewriteRule .*/redir/(.+)\.bas$$1.bas [P]

(This machine is no ever connected to the Internet, so you have no way to hack this Linux based on this information.)

[<<<] [>>>]