- put 'server.error-handler-404' to the right place + beautification

This commit is contained in:
Michael Kaufmann (d00p)
2010-04-13 07:10:30 +00:00
parent cfaae63657
commit 47b2fe7c7c
2 changed files with 13 additions and 14 deletions

View File

@@ -459,27 +459,26 @@ class lighttpd
{
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')
{
$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))
{
$path_options.= $error_string;
// reset $error_string here to prevent duplicate entries
$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
{

View File

@@ -66,7 +66,7 @@ class lighttpd_fcgid extends lighttpd
$phpconfig = $this->getPhpConfig((int)$domain['phpsettingid']);
$php_options_text = 'fastcgi.server = ( '."\n";
$php_options_text = ' fastcgi.server = ( '."\n";
$file_extensions = explode(' ', $phpconfig['file_extensions']);
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".')'."\n";
$php_options_text.= "".')'."\n";
$php_options_text.= "\t".')'."\n";
} // foreach extension
$php_options_text.= "".')'."\n";
$php_options_text.= ' )'."\n";
// create starter