httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: Config'ing CGI's (was: Two odd (but probably basic) problems with executables)
Date Mon, 29 Apr 2002 19:06:15 GMT

On Mon, 29 Apr 2002, Darrel Austin wrote:

> Thanks everyone for the feedback! I'm still trying to digest this.

It looks like you are getting there (slowly ;-).

>
> OK, so here's what I have now:
>
> <VirtualHost xxx.xxx.xxx.xxx>
> DocumentRoot /var/www/virtualhosts/site/html
> ServerName servername.com
> Options +ExecCGI
> AddHandler cgi-script .cgi
> </VirtualHost>

> Does the "Options +ExecCGI" command apply to nested directories, or only the
> parent directory spec'ed in the virtual host directive?

This is answered by the FAQ reference I gave you, but I'll rephrase it
here: Options directives (and pretty much every other directive) do apply
to nested directories.  But Options directives can override each other,
and since the Options in the <VirtualHost> is applied before other Options
directives that you probably have elsewhere in <Directory> containers, it
gets overriden by those other Options.  Note in particular that

<VirtualHost xxx>
Options +ExecCGI
</VirtualHost>
<Directory /var/www>
Options Indexes
</Directory>
will result in ExecCGI being OFF in /var/www and below directories,
because "Options Indexes" sets everything but Indexes to off.

> Am I even putting the options and the AddHandler in the correct part of the
> config file?

The AddHandler is fine there, because it isn't likely to get overridden.
It could also be placed in a specific <Directory> section.

> quite grasp the manual in context. The examples seem to make sense in and of
> themselves, but I get completely lost when attempting to figure out WHERE
> specific commands should go.
> http://httpd.apache.org/docs/misc/FAQ.html#options mentions the DIRECTORY
> tag, but I can't figure out where it goes in relation to the VirtualHost
> tag.)

It can go pretty much anywhere.  If you want it to apply ONLY to that
virtualhost, then put it inside the <VirtualHost> tags.  Otherwise, put it
immediately before or after the <VirtualHost> section.

> For future reference, just so I get this straight, from what I understand
> the +/- appends any previous Options statement while if you don't use the
> +/- the options are all defaulted to none before applying the new
> declaration. Correct?

Exactly.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message