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.

I've had issues with Apache 2 on my server of which I had an Apache2-worker/php-fpm setup and am migrating to Nginx.

I've followed various guides to set up the wrapper script for fastcgi spawning for PHP-cgi and Nginx, however I can find no guide on running the actual cgi script under specific users.

i.e. this Linode guide (and others) hardcoding the wrapper in an init.d script: http://library.linode.com/web-servers/nginx/php-fastcgi/debian-6-squeeze

Right now I have made a script to add a user/group for each individual vhost directories, and chowning the public_html directories - however this seems useless as the PHP process will still be ran under the www-data user.

Any guides for doing this? Am I just searching the wrong things this late?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Fastcgi does not have user switching, so you have to spawn a process(or multiple) for each of your users. PHP-FPM makes this very easy via pools, and you should be using that over vanilla php-cgi any way.

share|improve this answer
    
Thank you very much for clarifying this, was wondering why most of the guides I ran in to were fastcgi rather than php-fpm like my previous (semi-working) Apache one. Will look in to this. –  Alexander Jul 21 '11 at 1:02
add comment

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.