Next: CGI scripts
Up: Form processing
Previous: Form processing
Contents
Index
There are a multitude of different web servers available.
The most popular one is that made by Apache - see
http://httpd.apache.org/ for details, and also
links to (free) binary versions for Windows (obtain
a file ending with a msi extension - double clicking
on it will set up and install Apache).
The operation of the web server is controlled by certain
configuration files - the main one is called httpd.conf,
which resides under a conf subdirectory underneath the
top-level directory under which you installed Apache. There
are many directives contained in this file - we shall highlight
a few of them here, and leave it to the Apache documentation
to provide further details.
- ServerRoot "D:/www/Apache2"
This gives the top-level directory under which all
further files relevant to the operation of the web server are found.
- DocumentRoot "D:/www/Apache2/htdocs"
This gives the top-level directory under which all pages
to be served by the web server are found. For example,
a request for http://localhost/projects/index.html
will send a file index.html contained in a
projects subdirectory found under
D:/www/Apache2/htdocs. Note that localhost
is an alias that you can use for any local computer. Also
note that, in the context of a web server, directories
are separated by a forward slash (/).
- ScriptAlias /cgi-bin/ "D:/www/Apache2/cgi-bin/"
This directive does two things. It first allows scripts
placed under D:/www/Apache2/cgi-bin/ can be executed,
and secondly, sets up an alias that such scripts are accessed
as http://localhost/cgi-bin/script_name. This is
valuable from the point of view of security - allowing
a remote user to execute a program on another machine
opens up a whole host of security concerns, and the
ScriptAlias directive ensures that only scripts
living beneath a certain directory can be run.
Next: CGI scripts
Up: Form processing
Previous: Form processing
Contents
Index