SetEnv funciona com o mod-fcgid. Minha configuração:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
FCGIWrapper /usr/lib/cgi-bin/php5
AddHandler fcgid-script .php
Options ExecCGI Indexes
SetEnv MYAPP_LOGGING_ROOT "/usr/local/myapp/logs"
</Directory>
foo.php:
<?php
var_dump($_SERVER["MYAPP_LOGGING_ROOT"]);
?>
Teste:
curl localhost/foo.php
string(21) "/usr/local/myapp/logs"