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

As the title, I have many vhosts, how Can I run PHP with the user's permission ?

website1 --> user1:user1
website2 --> user2:user2
website3 --> user3:user3

I have read suphp, but it is extremely slow I have read 25 times slower the mod_php.

Can I do it differently?

share|improve this question

migrated from stackoverflow.com Apr 29 '11 at 15:11

This question came from our site for professional and enthusiast programmers.

2 Answers 2

I believe you're looking for this.

mpm-itk allows you to run each of your vhost under a separate uid and gid

share|improve this answer
@Chris ok, but run vhosts with separate uid and gid also means that php will run with these permission ? –  Damiano Apr 27 '11 at 21:10
@Chris then... does it degrade the performance of the server? –  Damiano Apr 27 '11 at 21:11
@Damiano: Yes php runs with those permissions, however I can't comment on the performance. I run it at my company and we haven't noticed anything, but we don't get a whole lot of traffic. –  Chris Apr 27 '11 at 21:19
@Damiano: also it depends on what you mean by performance. If you mean apache's performance, then yes possibly, if by a very small amount. If you mean php, I can't imagine how it would degrade php's performance. –  Chris Apr 27 '11 at 21:21
Very interesting, thanks. –  Capsule Apr 27 '11 at 21:26

You can use PHP though FastCGI instead of using mod_apache. There's some good information on this page

share|improve this answer
I believe this is what suPHP does, and yes, it's slow as hell! –  Capsule Apr 27 '11 at 21:25
No, suPHP uses plain old CGI - FastCGI does not involve process creation on each request and is not slow. –  ThiefMaster Apr 27 '11 at 21:27
php-fpm.org is a new FastCGI implementation and is quick with some other nice features thrown in. –  ollybee Apr 29 '11 at 22:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.