- put 'server.error-handler-404' to the right place + beautification
This commit is contained in:
@@ -459,27 +459,26 @@ class lighttpd
|
|||||||
{
|
{
|
||||||
if(!empty($row['error404path']))
|
if(!empty($row['error404path']))
|
||||||
{
|
{
|
||||||
$error_string.= ' server.error-handler-404 = "' . makeCorrectFile($domain['documentroot'] . '/' . $row['error404path']) . '"' . "\n";
|
$error_string.= ' server.error-handler-404 = "' . makeCorrectFile($domain['documentroot'] . '/' . $row['error404path']) . '"' . "\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($row['options_indexes'] != '0')
|
if($row['options_indexes'] != '0')
|
||||||
{
|
{
|
||||||
$path = makeCorrectDir(substr($row['path'], strlen($domain['documentroot']) - 1));
|
|
||||||
|
|
||||||
mkDirWithCorrectOwnership($domain['documentroot'], $row['path'], $domain['guid'], $domain['guid']);
|
|
||||||
|
|
||||||
// We need to remove the last slash, otherwise the regex wouldn't work
|
|
||||||
|
|
||||||
$path = substr($path, 0, -1);
|
|
||||||
$path_options.= '$HTTP["url"] =~ "^' . $path . '($|/)" {' . "\n";
|
|
||||||
$path_options.= "\t" . 'dir-listing.activate = "enable"' . "\n";
|
|
||||||
if(!empty($error_string))
|
if(!empty($error_string))
|
||||||
{
|
{
|
||||||
$path_options.= $error_string;
|
$path_options.= $error_string;
|
||||||
// reset $error_string here to prevent duplicate entries
|
// reset $error_string here to prevent duplicate entries
|
||||||
$error_string = '';
|
$error_string = '';
|
||||||
}
|
}
|
||||||
$path_options.= '}' . "\n";
|
|
||||||
|
$path = makeCorrectDir(substr($row['path'], strlen($domain['documentroot']) - 1));
|
||||||
|
mkDirWithCorrectOwnership($domain['documentroot'], $row['path'], $domain['guid'], $domain['guid']);
|
||||||
|
|
||||||
|
// We need to remove the last slash, otherwise the regex wouldn't work
|
||||||
|
$path = substr($path, 0, -1);
|
||||||
|
$path_options.= ' $HTTP["url"] =~ "^' . $path . '($|/)" {' . "\n";
|
||||||
|
$path_options.= "\t" . 'dir-listing.activate = "enable"' . "\n";
|
||||||
|
$path_options.= ' }' . "\n\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class lighttpd_fcgid extends lighttpd
|
|||||||
|
|
||||||
$phpconfig = $this->getPhpConfig((int)$domain['phpsettingid']);
|
$phpconfig = $this->getPhpConfig((int)$domain['phpsettingid']);
|
||||||
|
|
||||||
$php_options_text = 'fastcgi.server = ( '."\n";
|
$php_options_text = ' fastcgi.server = ( '."\n";
|
||||||
$file_extensions = explode(' ', $phpconfig['file_extensions']);
|
$file_extensions = explode(' ', $phpconfig['file_extensions']);
|
||||||
foreach($file_extensions as $f_extension)
|
foreach($file_extensions as $f_extension)
|
||||||
{
|
{
|
||||||
@@ -109,10 +109,10 @@ class lighttpd_fcgid extends lighttpd
|
|||||||
|
|
||||||
$php_options_text.= "\t\t".')'."\n";
|
$php_options_text.= "\t\t".')'."\n";
|
||||||
$php_options_text.= "\t".')'."\n";
|
$php_options_text.= "\t".')'."\n";
|
||||||
$php_options_text.= "".')'."\n";
|
$php_options_text.= "\t".')'."\n";
|
||||||
|
|
||||||
} // foreach extension
|
} // foreach extension
|
||||||
$php_options_text.= "".')'."\n";
|
$php_options_text.= ' )'."\n";
|
||||||
|
|
||||||
// create starter
|
// create starter
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user