Web Server Configuration
Before you proceed with CGI Programming, make sure that your Web
Server supports CGI and it is configured to handle CGI Programs.
All the CGI Programs to be executed by the HTTP server are kept in
a pre-configured directory. This directory is called CGI directory
and by convention it is named as /var/www/cgi-bin. By convention CGI
files will have extension as .cgi, though they are C++ executable.
By default, Apache Web Server is configured to run CGI programs
in /var/www/cgi-bin. If you want to specify any other directory to
run your CGI scripts, you can modify the following section in the httpd.conf file:
<Directory "/var/www/cgi-bin">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/cgi-bin">
Options All
</Directory>
Here, I assume that you have Web Server up and running successfully and
you are able to run any other CGI program like Perl or Shell etc.
No comments:
Post a Comment