add support for the new apache-2.4

Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
This commit is contained in:
Michael Kaufmann (d00p)
2013-02-25 09:59:26 +01:00
parent 519db12a85
commit d7eef7a8b2
8 changed files with 90 additions and 17 deletions

View File

@@ -49,8 +49,13 @@ class apache_fcgid extends apache
$php_options_text.= ' Action php5-fastcgi /fastcgiphp' . "\n";
$php_options_text.= ' Options +ExecCGI' . "\n";
$php_options_text.= ' </FilesMatch>' . "\n";
$php_options_text.= ' Order allow,deny' . "\n";
$php_options_text.= ' allow from all' . "\n";
// >=apache-2.4 enabled?
if ($this->settings['system']['apache24'] == '1') {
$php_options_text.= ' Require all granted' . "\n";
} else {
$php_options_text.= ' Order allow,deny' . "\n";
$php_options_text.= ' allow from all' . "\n";
}
$php_options_text.= ' </Directory>' . "\n";
if ($domain['ssl'] == 1 && $ssl_vhost) {
$php_options_text.= ' Alias /fastcgiphp ' . makeCorrectDir($php->getInterface()->getAliasConfigDir()) . 'ssl-fpm.external' . "\n";
@@ -78,9 +83,14 @@ class apache_fcgid extends apache
$php_options_text.= ' FCGIWrapper ' . $php->getInterface()->getStarterFile() . ' .' . $file_extension . "\n";
}
$php_options_text.= ' Options +ExecCGI' . "\n";
$php_options_text.= ' </FilesMatch>' . "\n";
$php_options_text.= ' Order allow,deny' . "\n";
$php_options_text.= ' allow from all' . "\n";
$php_options_text.= ' </FilesMatch>' . "\n";
// >=apache-2.4 enabled?
if ($this->settings['system']['apache24'] == '1') {
$php_options_text.= ' Require all granted' . "\n";
} else {
$php_options_text.= ' Order allow,deny' . "\n";
$php_options_text.= ' allow from all' . "\n";
}
$php_options_text.= ' </Directory>' . "\n";
}
}