virtualmin on ubuntu

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

Status: 
Closed (fixed)

Comments

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 the SetHandler lines. Then restart Apache.

Let us know if that helps ..

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.

That file contains:

-------quote start-----

<FilesMatch "\.ph(p3?|tml)$">

SetHandler application/x-httpd-php

</FilesMatch>

<FilesMatch "\.phps$">

SetHandler application/x-httpd-php-source

</FilesMatch>

# To re-enable php in user directories comment the following lines

# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it

# prevents .htaccess files from disabling it.

<IfModule mod_userdir.c>

    <Directory /home/*/public_html>

        php_admin_value engine Off

    </Directory>

</IfModule>

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

It is good enough to remove just the SetHandler lines.

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

Yeah, it is rather annoying that Ubuntu made this change, as it cannot be overridden by anything Virtualmin puts in a <Virtualhost> block.

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?