Provide user accessible PHP launcher for nginx


After switching from Apache to nginx I was disappointed to learn that the PHP customisation instructions here are entirely inaccurate; contrary to what is said Dreamhost’s nginx does not look for a ~/.php-launcher or ~/.php-ini file, which seems to mean that use of a VPS admin is required unless you want to be stuck on a no-longer supported version of PHP with default settings.

I would like to strongly request that something similar to what is described on the wiki page be implemented, perhaps more usefully under the ~/nginx/ folder that is already being used?

Without this capability, anyone wanting to run nginx is effectively forced to use a VPS admin account, despite being told that to do so means Dreamhost won’t offer any automatic services for managing it. This is pretty bad for a feature that’s been on Dreamhost for over three years, especially when Dreamhost’s Apache version seems to have such poor memory consumption properties (I switched to nginx to get away from the unacceptable memory spikes that Apache was causing, constantly forcing my VPS to reboot).


Okay, so it seems that these locations may actually work as intended, but not if supervisord is running on the server (as it doesn’t check these locations).

In this case please disregard the post, but consider it another plea to actually provide options for setting PHP 5.3 and PHP 5.4 for nginx servers (and keep them synced with Apache if it gets newer PHP versions in future). I mean, it’s been years now and still PHP 5.2 is the default, even as more software drops support for it?! I realise that nginx doesn’t allow PHP versions per domain by default, but an option on the VPS configuration page shouldn’t be too hard to implement!


I just wanted to update this further to point out how much of a mess Dreamhost’s nginx support actually is.

As it happens, simply disabling supervisord isn’t enough, as the nginx init script won’t detect this, since all it does is queries a PHP_SUPERVISOR variable, which is actually stored in /etc/default/nginx, which must be manually changed as well in order to switch nginx over to using the ~/.php-launcher location as expected.

This means that creating a VPS admin is in fact mandatory, at which point it is easier to just change /etc/supervisor/supervisord.conf, or change the default PHP version by redirecting /dh/cgi-system/php.cgi, but then the whole thing is so messy that it’s hard to know which option is going to ensure that updates won’t break things and put us back to a discontinued PHP version!

It’s just a complete and utter mess; either the .php-launcher method should be supported as standard, or the control panel should provide a means for safely setting the PHP version, we shouldn’t need to create a VPS admin to change basic settings, and certainly not when Dreamhost has had years to get its act together. I mean, you guys even use nginx for your own site! So why then do you provide your best support for Apache, especially when its spastic memory consumption is just about the worst thing imaginable for hosts with fixed memory restrictions.


+1 for this