You want to run Perl, PHP, or Python programs in a web environment.
Execute them using the Apache server.
This section describes how to configure Apache for running Perl, PHP, and Python scripts, and illustrates how to write web-based scripts in each language.
There are typically several
directories under the Apache root directory, which
I’ll assume here to be
/usr/local/apache. These directories include:
Contains httpd—that is, Apache itself—and other Apache-related executable programs
For configuration files, notably
primary file used by Apache
The root of the document tree
For log files
To configure Apache for script execution, edit the
httpd.conf file in the
directory. Typically, executable scripts are identified either by
location or by filename suffix. A location can be either
language-neutral or language-specific.
Apache configurations often have a
cgi-bin directory under the server root
directory where you can install scripts that should run as external
programs. It’s configured using a
ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/
The second argument is the actual location of the script directory in
your filesystem, and the first is the pathname in URLs that
corresponds to that directory. Thus, the directive just shown
associates scripts located in
/usr/local/apache/cgi-bin with URLs that have
cgi-bin following the hostname. For example, if you install the ...