add optional support for apache-itk-mpm (mod_php only)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -43,6 +43,16 @@ return array(
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2')
|
||||
),
|
||||
'system_apache_itksupport' => array(
|
||||
'label' => $lng['serversettings']['apache_itksupport'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'apacheitksupport',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 0 && Settings::Get('phpfpm.enabled') == 0),
|
||||
'websrv_avail' => array('apache2')
|
||||
),
|
||||
'system_httpuser' => array(
|
||||
'label' => $lng['admin']['webserver_user'],
|
||||
'settinggroup' => 'system',
|
||||
|
||||
@@ -1841,3 +1841,5 @@ $lng['error']['fcgidandphpfpmnogoodtogether'] = 'FCGID and PHP-FPM cannot be act
|
||||
$lng['admin']['configfiles']['legend'] = 'You are about to configure a service/daemon. The following legend explains the nomenclature.';
|
||||
$lng['admin']['configfiles']['commands'] = '<span class="red">Commands:</span> These commands are to be executed line by line as root-user in a shell. It is safe to copy the whole block and paste it into the shell.';
|
||||
$lng['admin']['configfiles']['files'] = '<span class="red">Configfiles:</span> This is an example of the contents of a configuration file. The commands before these textfields should open an editor with the target file. Just copy and paste the contents into the editor and save the file.<br><br><span class="red">Please note:</span> The MySQL-password has not been replaced for security reasons. Please replace "MYSQL_PASSWORD" on your own. If you forgot your MySQL-password you\'ll find it in "lib/userdata.inc.php"';
|
||||
$lng['serversettings']['apache_itksupport']['title'] = 'Use modifications for Apache ITK-MPM';
|
||||
$lng['serversettings']['apache_itksupport']['description'] = '<strong class="red">ATTENTION:</strong> use only if you acutally have apache itk-mpm enabled<br />otherwise your webserver will not be able to start';
|
||||
|
||||
@@ -1568,3 +1568,5 @@ $lng['error']['fcgidandphpfpmnogoodtogether'] = 'FCGID und PHP-FPM können nicht
|
||||
$lng['admin']['configfiles']['legend'] = 'Du konfigurierst nun einen Service/Daemon. Die folgende Legende zeigt unsere Nomenklatur.';
|
||||
$lng['admin']['configfiles']['commands'] = '<span class="red">Kommandos:</span> Die angezeigten Befehle müssen als Benutzer root in einer Shell ausgeführt werden. Es kann auch problemlos der ganze Block kopiert und in die Shell eingefügt werden.';
|
||||
$lng['admin']['configfiles']['files'] = '<span class="red">Konfigurationsdateien:</span> Dies ist der Inhalt einer Konfigurationsdatei. Der Befehl direkt vor dem Textfeld sollte einen Editor mit der Zeildatei öffnen. Der Inhalt kann nun einfach kopiert und in den Editor eingefügt und die Datei gespeichert werden.<br><br><span class="red">Beachten Sie:</span> Das MySQL-Passwort wurde aus Sicherheitsgründen nicht ersetzt. Bitte ersetzen Sie "MYSQL_PASSWORD" manuell durch das entsprechende Passwort. Falls Sie es vergessen haben sollten, finden Sie es in der Datei "lib/userdata.inc.php".';
|
||||
$lng['serversettings']['apache_24']['title'] = 'Anpassungen für Apache ITK-MPM verwenden';
|
||||
$lng['serversettings']['apache_24']['description'] = '<div class="red">Achtung: Bitte nur verwenden, wenn wirklich Apache itk-mpm verwendet wird, ansonsten wird der Webserver nicht starten.</div>';
|
||||
|
||||
@@ -407,6 +407,16 @@ class apache {
|
||||
$php_options_text .= ' php_flag engine off' . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* check for apache-itk-support, #1400
|
||||
* why is this here? Because it only works with mod_php
|
||||
*/
|
||||
if (Settings::get('system.apacheitksupport') == 1) {
|
||||
$vhost_content.= ' <IfModule mpm_itk_module>' . "\n";
|
||||
$vhost_content.= ' AssignUserID '. $domain['loginname'] . ' ' . $domain['loginname'] . "\n";
|
||||
$vhost_content.= ' </IfModule>' . "\n";
|
||||
}
|
||||
|
||||
return $php_options_text;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user