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

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

2 Answers 2

up vote 3 down vote accepted

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

#!/bin/sh
PHPRC="/path/to/custom/php.ini"
export PHPRC
PHP_FCGI_CHILDREN=5
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
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

 
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.