Is there another way to run Apache2 securely for multiple end users (like hosting hundreds of blogs) without using CGI mode as required by suPHP?

It just seems so inefficient to use CGI mode for PHP when if we could set up permissions properly, we could host PHP through mod_php perhaps?

I mean, I do want to restrict these users to their home directories for their sites, but don't want any security issues.

link|improve this question

80% accept rate
BTW, I'd like to also make mention of this article, but I still want to know if there's a better way: serverfault.com/questions/36867/php-as-cgi-or-apache-module – ServerChecker Mar 23 '10 at 5:53
feedback

2 Answers

up vote 2 down vote accepted

PHP support FastCGI out of the box, so you could use mod_fastcgi or mod_fcgid and SuExec to run PHP scripts. It has almost the same performance as mod_php but still will run the scripts in individual user contexts.

You should also read this article series about securing shared hosting platforms.

link|improve this answer
feedback

I'm looking at MPM-ITK. Each vhost runs as it's own uid:gid. It's a prefork, so there's no threading problems either.

link|improve this answer
1  
When using mpm-itk the httpd master process runs with root privileges. For security reasons you want to avoid outward facing services to be run with root privileges usually. – joschi Mar 23 '10 at 7:12
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.