Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying a condition in my httpd.conf to load some options only if find a specific file. But it is not working :(

<IfModule mod_fcgid.c> #check if php fast-cgi is loaded
    <Files /cgi-bin/php.fcgi> #check if php.fcgi exists in document root folder
        AddHandler php5-fastcgi .php
        Action php5-fastcgi /cgi-bin/php.fcgi
    </Files>
</IfModule>

I want this to not to be obliged to create this file in every vhost that I made. If I load the module without this file, the site doesn't work.

share|improve this question

1 Answer 1

You can't. AddHandler and Action directive can be only appear in: server config, virtual host, directory and .htaccess context:

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.