- fixed deletion of created webserver-configs, misread the code-line in the first place, damn

- started implementing default errordocument feature
This commit is contained in:
Michael Kaufmann (d00p)
2010-04-28 06:41:50 +00:00
parent 606f8fe557
commit 5f5650f53a
3 changed files with 81 additions and 14 deletions

View File

@@ -151,6 +151,30 @@ class lighttpd
$this->lighttpd_data[$vhost_filename].= '}' . "\n";
}
/**
* bug #unknown-yet
*/
$this->_createStandardErrorHandler();
}
/**
* define a default server.error-handler-404-statement, bug #unknown-yet
*/
private function _createStandardErrorHandler()
{
if($this->settings['defaultwebsrverrhandler']['enabled'] == '1'
&& $this->settings['defaultwebsrverrhandler']['err404'] != ''
) {
$vhosts_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/05_froxlor_default_errorhandler.conf');
if(!isset($this->lighttpd_data[$vhost_filename]))
{
$this->lighttpd_data[$vhost_filename] = '';
}
$this->lighttpd_data[$vhost_filename] = 'server.error-handler-404 = "'.$this->settings['defaultwebsrverrhandler']['err404'].'"';
}
}
protected function create_htaccess($domain)
@@ -815,9 +839,7 @@ class lighttpd
{
if($vhost_filename != '.'
&& $vhost_filename != '..'
// this would lead to not delete config from
// maybe removed domains, etc. so comment it out, #102
// && !in_array($vhost_filename, $this->known_filenames)
&& !in_array($vhost_filename, $this->known_filenames)
&& preg_match('/^(05|10|20|21|30|50|51)_(froxlor|syscp)_(dirfix|ipandport|normal_vhost|wildcard_vhost|ssl_vhost)_(.+)\.conf$/', $vhost_filename)
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename)))
{