diff --git a/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php b/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php index fdca8489..918d3853 100644 --- a/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php +++ b/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php @@ -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 { diff --git a/scripts/jobs/cron_tasks.inc.http.25.lighttpd_fcgid.php b/scripts/jobs/cron_tasks.inc.http.25.lighttpd_fcgid.php index 6ec40e67..1d2e4ed8 100644 --- a/scripts/jobs/cron_tasks.inc.http.25.lighttpd_fcgid.php +++ b/scripts/jobs/cron_tasks.inc.http.25.lighttpd_fcgid.php @@ -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