HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   SuPHP in ISPConfig3 (http://www.howtoforge.com/forums/showthread.php?t=57561)

Captain 7th June 2012 09:30

SuPHP in ISPConfig3
 
Hello!

I use SuPHP for all my web-sites in ISPConfig3
But in htop I see www-data user only.

But in my old server ISPCOnfig2 I use suphp mod too, but I see all users who use apache (not www-data).

How to solve this thing?

Thank you.

till 7th June 2012 10:04

ISPConfig has a better mode then suphp which was not available in ispconfig 2 which also allows your sites to run under different users but its much faster. The recommended php mode in ispconfig 3 is:

Suexec: On
PHP mode: fast-cgi

If you prefer to use the slower suphp kode, then you should first check under which user php is really run. You can do that with a script like this:

<?php
touch('test.txt');
?>

upload it to a website directory and open it in a browser. You will either get a error message that the file test.php could not be written to the directory were the php file is, this indicates that suphp is really not working. If you dont get a error message, then a test.txt file must have been created in the same directory, check on the shell or with a ftp client which user owns this file, is it www-data or is it the user of the website.

Captain 7th June 2012 13:54

yes. file created. and owner is web-site owner (like web1:client1)

But what about security questions with fast-cgi?

And how I can to see which user run script in htop or top (now I see only that is www-data)?

Thank you Till.

till 7th June 2012 13:58

Quote:

But what about security questions with fast-cgi?
When you enable suexec as I recommended above, then fastcgi runs the php binary under the web user like suphp is doing it, so its as secure as suphp but faster.

Quote:

And how I can to see which user run script in htop or top (now I see only that is www-data)?
The processes that you have seen are most likely apache processes and apache runs always as www-data. The php cgi scripts spawned by suphp run only a very short time, so you might not see them at all.

If you switch to fastcgi, then you can see the processes and their owners with top, as fastcgi processes run a loner time as they were reused for new php processing requests.


All times are GMT +2. The time now is 11:58.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.