[clug] Apache configuration puzzle

David Schoen neerolyte at gmail.com
Wed Aug 20 12:37:34 GMT 2008


If your env variables are stable (no longer changing) and consistent across
your CGIs you would actually do better to just tell him the env variables
and set them straight in the main config.

In general the Apache people recommend never using htaccess -
http://httpd.apache.org/docs/2.2/howto/htaccess.html#when

The only time you should use htaccess is when you have a low volume site and
often changing Apache config and can't get access to the main config files.

- Dave

On Wed, Aug 20, 2008 at 6:46 PM, David Tulloh <david at tulloh.id.au> wrote:

> Paul Matthews wrote:
> >
> > We have to write a lot of cgi scripts at work, and each one needs it's
> > environment set up. Apparently this can be done by placing the
> > environment variables into a .htaccess file in the cgi directory. Which
> > we have done. The real problem is telling the guy who actually runs the
> > server what to place in the httpd.conf file.
> >
> > and we have tried the following ...
> >
> > <Directory "/data/apache/cgi-bin">
> >    AllowOverride *Options=PassEnv,SetEnv,UnsetEnv*
> >    Options None
> >    Order allow,deny
> >    Allow from all
> > </Directory>
> >
>
> Your AllowOverride syntax is wrong.  AllowOverride takes a set of
> categories, see the apache documentation for details.
> http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride
>
> Example lines would be:
> AllowOverride All
> AllowOverride FileInforight
>
> The All is a nice hammer and handy if you don't have bad users you have
> to watch out for.  The SetEnv documentation indicates that the FileInfo
> override is required so the second line should be sufficient for you.
> http://httpd.apache.org/docs/2.0/mod/mod_env.html#setenv
>
>
> So I think the following should work, I haven't tested it though.
>
> <Directory "/data/apache/cgi-bin">
>    AllowOverride FileInfo
>    Options None
>   Order allow,deny
>   Allow from all
> </Directory>
>
> David
> --
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux
>


More information about the linux mailing list