Hi,
On the compile/install :
tar xzvf apache_1.3.22.tar.gz
cd apache_1.3.22
./configure --prefix=/usr/local/apache
make
make install
(Obviously /usr/local/apache can be somewhere else if you wish)
To start the server....
/usr/local/apache/bin/apachectl start
Regarding cgi & perl - you probably just need to uncomment the following line in your httpd.conf file :
#AddHandler cgi-script .cgi
You then need to set-up the cgi directory (also in httpd.conf) :
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin"
The latter means that
will cause the server to look for 'test.cgi' in the physical directory /usr/local/apache/cgi-bin. Obviously it can be anywhere you like. The scripts should ordinarily be chown'd to the userid you are running the server under and have rwx permissions (especially exec). You wouldn't want anyone else to have exec access.
The following is an example cgi perl script
(in fact 'printenv' as supplied with apache)
#!/usr/local/bin/perl
##
## printenv -- demo CGI program which just prints its environment
##
print "Content-type: text/plain\n\n";
foreach $var (sort(keys(%ENV))) {
$val = $ENV{$var};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "${var}=\"${val}\"\n";
}
If you save that as printenv.cgi, make executable, put in your cgi-bin dircetory and then do
it should run and display all the current apache environment variable values.
Hope this helps