Rather complex question about chroot and suexec
Ben Chabot <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello! I'm not really sure how, or if, I could get this to work. I've tried installing mod_fastcgi, but I have a feeling, it won't work like that with my setup. Basically, I have lots of virtualhosts, in a structure like /www/h/o/host.com/ and through suexec and sshd.. etc they are chrooted there. They just see their own /html /etc /bin... etc. They all have their own copy of php, which as I'm sure you can imagine, is very slow when it's hit very quickly. FastCGI appears to me to be a good solution, ostensibly I could keep my current setup, but I'm not quite sure how to do it. I don't think mod_fastcgi handles the requests for .php files after it goes through suexec (it doesn't appear to, I've run scripts through php CGI/FastCGI and it doesn't make requests back to the server I have setup in httpd.conf and listening on port 9000) Hopefully that's enough background, I have two questions : 1) Is there any way I can run a local copy of php (and perl) listening on a local port for FastCGI requests and some kind of wrapper in the chroot, so that all my vhosts use the same installation of php? (I do this for sendmail, as you can't have a sendmail in every chroot, so there is a wrapper, that takes sendmail command line and in turn sends it to 127.0.0.1:25.) 2) If #1 is plausible (hints or examples would be _greatly_ appreciated!) then how do I maintain the chroot? Is that even possible? Would I have to run a separate process for each vhost? How could I still chroot the scripts to their home directory while reaping the benefits of using FastCGI? I'm really at a loss, I'm not really sure how all these separate elements tie together, I'd be very grateful if someone could illuminate my understanding of how this might (or might not) work. Thank you very much!! Ben p.s. if this isn't what I need, or anyone has an opinion of how I can speed up my setup, besides the obvious of going to mod_php or something similar, feel free to tell me! I'm running Apache2, suexec + chroot patch, php 4.4.1... the performance problem is that php eats up CPU, and when a script is requested X times very quickly, it means to a LOT of CPU time being consumed, it's horribly inefficient right now. ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/