[Techtalk] Apache: different handlers in a directory
Mary
mary-linuxchix at puzzling.org
Fri Mar 11 15:21:32 EST 2005
Hi folks,
I have a directory, /var/www/cgi-bin, which contains 26 scripts. Here's
the situation:
- those scripts should each be accessible via
http://localhost/cgi-bin/scriptName (this is hardcoded into a number
of other testing scripts)
- 25 of those scripts should have "SetHandler fastcgi-script"
- 1 of those scripts should have "SetHandler cgi-script"
I'd prefer not to have to set up the handlers individually, since it's
the same value for 25 different files.
When all the files have the same handler, this works:
ScriptAlias /cgi-bin/ "/var/www/cgi-bin"
<Directory "/var/www/cgi-bin">
SetHandler fastcgi-script
</Directory>
However, this doesn't:
ScriptAlias /cgi-bin/ "/var/www/cgi-bin"
<Directory "/var/www/cgi-bin">
SetHandler fastcgi-script
Options +ExecCGI
</Directory>
<Files "/var/www/cgi-bin/exceptionScript">
SetHandler cgi-script
Options +ExecCGI
</Files>
What happens according to the error logs is this:
[Fri Mar 11 15:17:50 2005] [warn] FastCGI: (dynamic) server "/var/www/cgi-bin/exceptionScript" (pid 11063) terminated by calling exit with status '0'
Does anyone have the Apache 2 config magic to set this up? I'd prefer
not to have to individually alias and set up all 25 files when they all
have exactly the same settings!
-Mary
More information about the Techtalk
mailing list