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

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.


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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