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 want to manage several SVN repositories for a particular vhost in my system. I want those to be owned by a particular user in the system and not by wwwrun/www. The other websites hosted by Apache should be regularly executed by the unprivileged wwwrun/www user.

I'm using worker. How can I tell Apache that every request for a specific vhost must be served impersonating a specific user like I would do in IIS?

(This will also come useful when running FUDforum)

share|improve this question
    
I found httpd.apache.org/docs/current/suexec.html suExec. Does it work only for CGI/SSI or also with DAV_SVN and php-fpm over fcgi? –  djechelon Sep 27 '12 at 20:48
add comment

1 Answer 1

up vote 1 down vote accepted

There are custom branches of Apache that have a specific directive for running as a given user.

  1. mpm-peruser
  2. mpm-itk

Per-user is very mature and stable for use in production. As this occurs at Apache itself, it means all your modules will run as whoever you desire.

share|improve this answer
    
I've seen itk is a fork of prefork, and peruser looks like the same. I'm skeptic only because I chose worker because it has better performance with mod-mono. I'm considering your answer but I prefer keeping the worker for performance reasons... if I can! –  djechelon Sep 27 '12 at 21:13
    
I can't comment on mod_mono, I'm not familiar with it. But in terms of performance I haven't seen any overheads for PHP based apps. We built a custom branch of per_user that outperforms prefork, like for like. The multiplexers and queues work surprisingly well. –  Ben Lessani - Sonassi Sep 27 '12 at 21:17
    
I've read on mono-project.com/Mod_mono (seek for "prefork") that "It is advisable to use the worker MPM with mod_mono. Unfortunately, PHP seems to not necessarily work with the worker MPM, so you may not be able to go this route.". It doesn't mean mono doesn't work, I believe it runs better. Since mod_mono still runs with prefork, I can still move to the peruser module once I've made sure that performs well with both PHP and mono. Also, if I move to peruser, I can throw php-fpm away :) –  djechelon Sep 27 '12 at 21:48
    
To be clear: BOTH Mono and PHP run with any worker. I was worried about performance (speed and memory consumption) –  djechelon Sep 27 '12 at 21:50
1  
I wouldn't give any great concern, the difference is probably negligible anyway. Test with either and see how it actually applies to your situation. –  Ben Lessani - Sonassi Sep 27 '12 at 21:55
show 1 more 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.