Forum Moderators: phranque

Message Too Old, No Replies

MultiViews for CGI

         

BorisM

4:33 am on Mar 25, 2005 (gmt 0)



I run two virtual servers from the same config file.

abc.com works fine. If I request [abc.com...]
I am served index.ZZ.html, where ZZ matches the language
preference I set on my browser ("en", "ru", "zh", etc.).

xyz.com has two problems.
1) A request for [xyz.com...] produces an error log
entry: "attempt to invoke directory as script". (I
could live with this, but it is annoying.)
2) A request for [xyz.com...] serves a CGI
created script, but _always_ in English.
I can force the language by requesting
[xyz.com...] but browser preferences are
seemingly ignored. (The scripts are named XYscript.ZZ.cgi,
where ZZ is again a language code.) (English is
specified in "ForceLanguagePriority Prefer Fallback".)

I have read through similar discussions, but despite various
edits/changes I am getting nowhere. Perhaps trying to
serve CGI from the 'home' diectory is not amenable to
the 'usual' solutions?

Configurtion is:

<Directory /var/www/xyz/scripts>
Options MultiViews +Indexes +ExecCGI
SetHandler cgi-script
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex XYscript
<IfModule mod_access.c>
# Order deny,allow
# Deny from all
# Allow from env=local_referal
</IfModule>
</Directory>

and

<VirtualHost 12.34.56.789>
ServerAdmin webmaster@xyz.com
DocumentRoot /var/www/xyz/scripts
ServerName xyz.com
ErrorLog /var/log/httpd/xyz/error_log
TransferLog /var/log/httpd/xyz/access_log
CustomLog /var/log/httpd/xyz/deflate_log deflate
RewriteEngine On
RewriteCond %{THE_REQUEST} http:// [NC]
RewriteCond %{THE_REQUEST}!^(GET¦POST)\ /?http://xyz\.com [NC]
RewriteRule .* - [F]
#
<IfModule mod_alias.c>
Alias /images/ /var/www/xyz/images/
# ScriptAlias // /var/www/xyz/scripts/
</IfModule>
AddOutputFilterByType DEFLATE text/html text/xml text/plain
</VirtualHost>

Obviously something so stupid I'm going to hit myself,
but I just can neither see it nor trip it by editing
(the remnants of which you see commented out above!).