Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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


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.