|
From: Jamie C. <jca...@we...> - 2014-12-04 00:43:40
|
On 03/Dec/2014 07:21 Csere Mátyás <cs...@gm...> wrote .. > > 2014.12.03. 3:31 keltezéssel, Jamie Cameron írta: > > On 02/Dec/2014 07:31 Csere M�ty�s <cs...@gm...> wrote .. > >> 2014.12.02. 2:32 keltez�ssel, Jamie Cameron �rta: > >>> Right now, there is no way to do this - Virtualmin always copies all directives > >>> from the non-SSL virtualhost to the SSL version so that they remain in sync. > >>> > >>> What settings do you want to vary exactly? > >> I am using php-fpm with apache(2.2) FastCgiExternalServer. > >> For it to work I need to have something like this in my vhosts: > >> <IfModule mod_fastcgi.c> > >> AddHandler php5-fcgi .php > >> Action php5-fcgi /php5-fcgi > >> Alias /php5-fcgi /home/vhost/public_html/some-unique-name-all-trough-apache > >> FastCgiExternalServer > >> /home/vhost/public_html/some-unique-name-all-trough-apache -socket > >> /path/to/phpfpm-socket. > >> </IfModule> > >> > >> Adding an SSL vhost compromises my path of > >> "/home/vhost/public_html/some-unique-name-all-trough-apache" > >> and apache fails to start with "FastCgiExternalServer: redefinition of > >> previously defined class > >> /home/vhost/public_html/some-unique-name-all-trough-apache" > > Oh, I see... I wonder if instead you could use the <If...> block that only > > matches for the SSL virtualhost? > I don't understand your idea. > According to http://httpd.apache.org/docs/2.2/mod/directives.html the > only <IF....>'s are > <ifdefine>, <ifmodule>, and <ifversion> My mistake, there isn't actually any <if> statement that can be used to do what you want. > >> Speaking of templates: > >> Since I am not using virutalmin's pre-set of php enviroments (in > >> virtualmin I have it set to mod_php), I would like to give my users an > >> opportunity > >> to choose between php versions. > >> So far I have got to the point where I have a Custom Field Menu, with > >> PHP versions in it, then generate the FastCgiExternalServer line's > >> socket path accordingly, > >> inside apache template (-socket > >> /path/to/php-fpm/socket/${FIELD_PHP}/php5-fpm.sock-${UID}, with PHP > >> having values 52,53,54) > >> This almost works as i want it to: when I change the field value the web > >> feature needs to be disabled/enabled so the vhost would update its file. > >> What solution would you suggest for this problem (let users choose > >> between my custom php versions automatically)? > >> Perhaps I need to write (if possible) a new feature plugin to handle all > >> this? > > I think you'd need a new plugin for this, which adds a new left-menu item. > > Changing custom fields can't update the Apache config currently. > > > For this you would suggest reading through > http://doxfer.webmin.com/Webmin/ModuleDevelopment and then > https://www.virtualmin.com/documentation/developer/plugins > right? :) Yes, that explains it. A plugin could also make the fastcgi directive changes you want, as Virtualmin only syncs the VirtualHost blocks at creation time. |