View Full Version : PHP Set UID Mode
gahan
12-31-2005, 10:35 PM
Hi
I wish I could see such feature at http://www.litespeedtech.com/docs/VirtualHosts_Help.html after 'CGI Set UID Mode' some day :)
PHP Set UID Mode: PHP file UID/Doc root UID
Is there any chance that lsws will support that? I know it's impossible with fcgi (well running seperate wrapper for each uid 'solves' issue) but how about lsphp?
All the best in the 2006
mistwang
01-02-2006, 07:07 PM
Thanks!
It is possible to run PHP in suexec CGI mode, there is no dedicated configuration for this but it can be done with some simple rewrite rules to simulate Apache's "Hanlder" directive. I will post the rewrite rule later.
Anyway, running PHP as CGI does not give the best performance.
It is not possible to do that with lsphp yet, it is on our to do list. :-)
Happy new year!
gahan
01-04-2006, 09:10 AM
That would be great.
Thanks for reply
pizzaman
03-22-2006, 04:22 AM
mistwang,
I've read through a couple posts regarding running PHP suExec through fastcgi interface, and what I understand is that it's currently not possible in a straightforward way. However, you suggested that it's possible to do so if we provide dedicated php-fcgi process for each UID. How exactly do we do that?
I've running such a setup with lighttpd with great success bar some sites canot be run there since due to some complications in its rewrite enginge--so I decide to give litespeed a try. So far so good, except I need to run php in suExec way. :)
Thanks in advance.
mistwang
03-22-2006, 09:41 PM
However, you suggested that it's possible to do so if we provide dedicated php-fcgi process for each UID. How exactly do we do that?
Just define a dedicate PHP FCGI or LSAPI application, php script handler, and set "CGI Chroot Mode" to "Doc Root UID".
http://www.litespeedtech.com/docs/VirtualHosts_Help.html#vhCGISetUidMode
For multiple similar vhost, you can use our vhost template feature.
pizzaman
03-23-2006, 07:58 AM
Oh wow, at first I set "CGI Set UID Mode" to "CGI File UID" and the script ran as "nobody". After I changed it to "DocRoot UID", then it magically runs as that user. :)
Thanks for your answer. I'll spend some time testing litespeed and if it turns out ok, will move some production sites to using it (behind apache proxy).
Arkadius
07-12-2006, 09:07 AM
pizzaman, could you please post how you created the FastCGI app ?
I am able to run the same if i start a php -b under the user I plan to but a start wrapper would be supreme for what I am trying to do.
Thank you.
Regards
Arkadius