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!

2 Answers 2


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)

  • Can you give some information on how to create the handler file? Not sure where to place these...
    – qodeninja
    Oct 6, 2009 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.

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.