7.2 Apache Configuration


Apache should be correctly configured if Linux was installed as suggested in Chapter 2. Nonetheless, two directives in /etc/httpd/conf/httpd.conf should be checked before you start using CGI. The ScriptAlias directive should be set to the proper directory:

 ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" 

The cgi-bin directory should have the proper options:

 <Directory "/var/www/cgi-bin">    AllowOverride None    Options None    Order allow,deny    Allow from all  </Directory> 

The AllowOverride directive tells the server how to handle HTTP authentication with .htaccess files. When the directive is set to None , .htaccess files are ignored.

If you changed anything in httpd.conf , restart the server:

 #  /etc/init.d/httpd graceful  


Open Source Development with Lamp
Open Source Development with LAMP: Using Linux, Apache, MySQL, Perl, and PHP
ISBN: 020177061X
EAN: 2147483647
Year: 2002
Pages: 136

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net