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 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.

share|improve this question
    
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
add comment

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.

share|improve this answer
add comment

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.

share|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
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.