Hi all, Happy New Year!,
I thought I'd try Ubuntu v10.04 but something bizarre is happening with apache. I create a new virtual server and even though under php script execution mode it's set to FCGId (run as virtual server owner) I can see apache running as www-data and there is no evidence of php-cgi or any process running as the user. How is it supposed to execute as the user? Originally I moved a backup from centos to a ubuntu server and thought maybe it's due to the environment change so as a test I created a new virtual server in ubuntu. It has FCGId selected under php script execution, and run cgi scripts as domain owner yes is selected. I've tried switching it to Apache mod_php restarted apache then set it back again to FCGId and restarted apache. as a test I run a php benchmark and watching the server through top no process belonging to the user is becoming busy - just apache running as www-data. We normally run the web site on centos and need to look into ubuntu to see if I can get it to run - it runs but it's unable to write to the user directories as it's not running as the user but as www-data. not sure where to start looking for this !! I've updated the server and webmin to current releases - virtualmin is at 3.82 with webmin v 1.530
Comments
Submitted by JamieCameron on Thu, 01/13/2011 - 15:11 Comment #1
The default Apache config on Ubuntu 10.04 unfortunately disables PHP execution via fcgi globally. We are releasing a fix to the Virtualmin installer for this, but the quick work-around is to SSH in as root and edit
/etc/apache2/mods_enabled/php5.conf
and remove or comment out theSetHandler
lines. Then restart Apache.Let us know if that helps ..
Submitted by andreychek on Thu, 01/13/2011 - 15:17 Comment #2
Howdy -- that's an unfortunate issue with Ubuntu 10.04 that the installer will soon automatically correct. However, in the meantime, you'll need to edit /etc/apache2/mods-enabled/php5.conf, and comment out the two SetHandler lines.
Those cause all PHP to be executed under mod_php, commenting them out and restarting Apache should correct that.
Submitted by dino on Thu, 01/13/2011 - 15:38 Comment #3
That file contains:
-------quote start-----
--------quote end------
text in it seems to suggest to comment the lines below it (ie ifModule mod_userdir.c> etc) should I comment the whole thing out?
Submitted by JamieCameron on Thu, 01/13/2011 - 15:44 Comment #4
It is good enough to remove just the
SetHandler
lines.Submitted by dino on Thu, 01/13/2011 - 16:26 Comment #5
thanks for this - yes it now works as expected. why did they change this I wonder? I've tried to look it up but can't find anything documenting this .. weird..
Submitted by JamieCameron on Thu, 01/13/2011 - 16:43 Comment #6
Yeah, it is rather annoying that Ubuntu made this change, as it cannot be overridden by anything Virtualmin puts in a <Virtualhost> block.
Submitted by dino on Thu, 01/13/2011 - 17:41 Comment #7
Submitted by cognosco on Thu, 01/20/2011 - 07:12 Comment #8
I have the same problem. Php is executed as www-data instead of username in Virtualmin. I would like to execute php as username, to avoid permission problems.
But when I comment those lines out I get 'No Input File specified' while loading the page. What could be wrong?
Submitted by andreychek on Thu, 01/20/2011 - 08:07 Comment #9
It looks like a new issue was just opened for that here:
https://www.virtualmin.com/node/16944