hi,
how can i run perl scripts from a apache webserver? how to create a internal space to test the scripts.
i've downloaded the apache_1.3.22.tar.gz, does anyone can tell me how to configure it?
and set up the internal space with mysql database.
thanx
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) :
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
##
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.