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

is there some sort of .htaccess directive. I dont have access to httpd.conf.

I have php5 in a fastcgi/cgi module.

Multiple domains.

But for some reason all the domains are pointing to the first domains php.ini (the one I installed php with in the script)

not sure if that got compiled into the build, or if theres some setting I can change someplace

thanks much!

share|improve this question
up vote 3 down vote accepted

You can do that in the handler script by setting PHPRC variable :

export PHPRC
exec /usr/local/php5/bin/php-cgi

Then you need to set up one different handler per domain (if you want a different php.ini)

share|improve this answer
Can you give some information on how to create the handler file? Not sure where to place these... – qodeninja Oct 6 '09 at 6:09

You can't using php as an apache's module.
If you want to have a per domain configuration at such a level of flexibility you should configure PHP to be run as a fast CGI.

In this case I suggest lighthttpd + PHP-CGI, this is a possible tutorial.

EDIT: @Julien Tartarin explained his way to achieve the goal in apache, but I suggest you to not be over-headed by apache's weight, if you don't need other apache's powerful modules there is no reason to use it with PHP as a FAST CGI.

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.