Added documentation comments, changed whitspace
[CGIscriptor.git] / CGIservletSETUP.pl
blob5b48dcce17439e388ad09503c215d413f757a883
1 # Configure CGIservlet by assigning to the relevant variables.
2 # This is just a copy of the default setup area of CGIservlet.pl.
3 # This file is read AFTER the default setup, but BEFORE the command line
4 # options are processed.
6 # License for use and disclaimers
8 # CGIscriptor merges plain ASCII HTML files transparantly
9 # with CGI variables, in-line PERL code, shell commands,
10 # and executable scripts in other scripting languages.
12 # This program is free software; you can redistribute it and/or
13 # modify it under the terms of the GNU General Public License
14 # as published by the Free Software Foundation; either version 2
15 # of the License, or (at your option) any later version.
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 ############################################################
27 # #
28 # Parse arguments (you can define DEFAULT VALUES here) #
29 # #
30 ############################################################
32 # User set Envrionment variables
33 # In real use, read the key from a keyfile, e.g.,
34 # open(KEYFILE, "</media/KEYS/keyfile");$UserEnv{'CGIMasterKey'} = <KEYFILE>;chomp($UserEnv{'CGIMasterKey'});close(KEYFILE);
35 $UserEnv{'CGIMasterKey'} = "Sherlock investigates oleander curry in Bath";
37 $port = 8080; # The port number
39 # (Fast) direct translation of full URL paths
40 %AliasTranslation = ('/Welcome.html' => '/'); # Alias => RealURL pairs (ONLY paths)
41 # Regular expression alias translation, in order of application
42 # (this can be quite slow)
43 @RegAliasTranslation = ('^(\..*|.*/\..*)$','\.htm$', '^.*\.log$'); # Full regular expression alias/url pairs: URL
44 @RegURLTranslation = ('/','.html', '/'); # Full regular expression alias/url pairs: PATH
46 #$textroot = $ENV{'PWD'} || `pwd`; # current working directory
47 #chomp($textroot); # Remove nasty newline, if present
48 #$doarg = ''; # do "filename",
50 $beginarg = "require 'CGIscriptor.pl';"; # eval($Argument) at the start of the program
51 # Use the files from CGIscriptor/ if it exists
52 $beginarg = "require 'CGIscriptor/CGIscriptor.pl'" if -d 'CGIscriptor';
54 $evalarg = 'Handle_Request();'; # eval($Argument) for each request
55 $execarg = ''; # `command \'$textroot$Path\' \'$QueryString\'`
57 #$welcome = '/index.html'; # Default path
59 # Rudimentary security, overflow detection
60 #$MaxBrood = 32; # Maximum number of running children
61 #$MaxTime = 36000; # Maximum time a child may run in seconds
62 #$MaxLength = 2**15; # Maximum Request Length
64 # If one of the following lists contains any client addresses or names, all others are
65 # blocked (be carefull, your site will be inaccessible if you misspell them).
66 #@RemoteHost = (); # Accepted Hosts, suggest: localhost
67 #@RemoteAddr = (); # Accepted IP addresses, suggest: @RemoteAddr=('127.0.0.1')
68 #$DefaultRemoteAddr = '127.0.0.1'; # default, use localhost IP address
69 #$NONAME = 0; # if 1, do NOT ask for REMOTE_HOST (faster)
71 # Store the whole Web Site in a hash table and use this RAM image
72 $UseRAMimage = 0;
74 # Execute shell CGI scripts when no -d, -e, or -x are supplied
75 $ExecuteOSshell = 0; # Do you REALY want this? It is dangerous
77 1; # Make require happy