mod_fastcgi is broken in several annoying ways under Apache 2. Even with patches found in the Debian build, it’s a bit of a mess.
You want mod_fcgid. The two cannot coexist in the same Apache (though both can installed–you can’t load them both into the same process).
The Virtualmin install script should have handled everything for you…though it only sets up for PHP apps, by default.
You can double check to be sure your box is setup to use FastCGI in the Server Templates under the Apache Website section. The option is labeled “Default PHP execution mode”. For existing virtual servers, you’ll need to look in “Server Configuration:Website Options” for the specific server.
What, specifically, are you wanting to run with FastCGI? And what trouble are you running into?
O.k., I did not have it set to fcgid, I was trying to set the CGI wrapper option.
Now that apache2-mod-fcgid is installed, in the Website and PHP Options dialog the option "FCGId (run as virtual server owner)" is presented.
So I set it for the domain in question, saved the settings, reloaded apache2, and now it gives the following error:
[code:1]Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at www.mydomain.com Port 80[/code:1]
Other domains on the same server that run as www-data still function normally.
Any suggestions? I have looked for documentation but have not found any so far.
Is DOCROOT set to /home? If not, you need to install our Apache package (this should also have been done by the install script, but I’ve been getting the feeling that lately that isn’t working for some reason). Try upgrading your system with apt-get, or just:
apt-get install apache2
And see if it’ll get our version.
The other possibility is permissions. Folks often get a little silly when presented with a “it won’t run” situation, and they’ll set permissions to 777 or similar. When using suexec, this just guarantees that it won’t run. Files to be run under suexec must meet the following conditions:
Owned by the user that owns the virtual server
Not group or world writable (thus, definitely not 777)
Within the DOCROOT discussed above
If any of those aren’t true, then things won’t work.
Egads…This is all wrong. (“Gromit! These are the wrong trousers, Gromit…and they’re all wrong!”)
Obviously our upgrade from GPL to Professional process has been drinking the Fail-Aid.
I’m guessing that you installed initially using the wbm modules, rather than using the install script for Virtualmin GPL? I think that’s the way to end up with the upgrade not enabling the Virtualmin Professional apt repository and such.
So, you probably want to get the apt repo setup. The virtualmin repo line looks like:
Then you can try upgrading Apache again. (You may also want to move your install over to a deb-based one, and use the Virtualmin Package updates module to help you stay on top of updates. Once apt is configured, you can get it via "apt-get install webmin-security-updates".)
I set the child processes from 4 to None and got a different error message.
New error message:
[code:1]Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@mydomain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at mydomain.com Port 80[/code:1]
Tailing the log shows this:
[code:1][Fri Aug 22 20:32:03 2008] [notice] mod_fcgid: call /home/nukesylo13/public_html/index.php with wrapper /home/nukesylo13/fcgi-bin/php5.fcgi
[Fri Aug 22 20:32:03 2008] [notice] mod_fcgid: server /home/nukesylo13/public_html/index.php(12523) started
[Fri Aug 22 20:32:03 2008] [notice] mod_fcgid: process /home/nukesylo13/public_html/index.php(12522) exit(server exited), terminated by calling exit(), return code: 0
PHP Warning: Module ‘json’ already loaded in Unknown on line 0[/code:1]
O.k., moving domains off the server to a shared host.
Once they start resolving there I’m going to remove Virtualmin completely and use the VM Pro install script instead of using the package upgrade from GPL to Pro.
Hopefully that will get everything configured properly.
I uninstalled apache2, virtualmin*, webmin*, and usermin*, then ran the VM Pro install.sh script.
Problem: I already had quotas set up, and when the script tried to set up quotas, it couldn’t and so it failed. Once I figured out what was up, I edited fstab and remounted the drive, then ran the script again and it completed successfully. Installed FCGId and it worked out of the box.
Created a Joomla instance and uploaded a file through the media manager using the browser, it uploaded fine which indicates that apache is spawned as the user instead of www-data.
Awesome, good stuff.
Might want to document somewhere that folks should disable their disk quotas before they try to install Virtualmin via the install.sh (assuming it was not just a problem on my server) and that to upgrade to Pro, everything Webmin, Usermin, and Virtualmin should be removed.
Of course it may already be written down somewhere and gotten overlooked.