remove possible trailing slash of apache DocumentRoot diretives as sugggested by the httpd-docs, thx to jonbert
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -172,7 +172,7 @@ class Apache extends HttpConfigBase
|
||||
|
||||
$mypath = $this->getMyPath($row_ipsandports);
|
||||
|
||||
$this->virtualhosts_data[$vhosts_filename] .= 'DocumentRoot "' . $mypath . '"' . "\n";
|
||||
$this->virtualhosts_data[$vhosts_filename] .= 'DocumentRoot "' . rtrim($mypath, "/") . '"' . "\n";
|
||||
|
||||
if ($row_ipsandports['vhostcontainer_servername_statement'] == '1') {
|
||||
$this->virtualhosts_data[$vhosts_filename] .= ' ServerName ' . Settings::Get('system.hostname') . "\n";
|
||||
@@ -661,7 +661,7 @@ class Apache extends HttpConfigBase
|
||||
|
||||
if ($domain['deactivated'] == '1' && Settings::Get('system.deactivateddocroot') != '') {
|
||||
$webroot_text .= ' # Using docroot for deactivated users...' . "\n";
|
||||
$webroot_text .= ' DocumentRoot "' . \Froxlor\FileDir::makeCorrectDir(Settings::Get('system.deactivateddocroot')) . "\"\n";
|
||||
$webroot_text .= ' DocumentRoot "' . rtrim(\Froxlor\FileDir::makeCorrectDir(Settings::Get('system.deactivateddocroot')), "/") . "\"\n";
|
||||
$webroot_text .= ' <Directory "' . \Froxlor\FileDir::makeCorrectDir(Settings::Get('system.deactivateddocroot')) . '">' . "\n";
|
||||
// >=apache-2.4 enabled?
|
||||
if (Settings::Get('system.apache24') == '1') {
|
||||
@@ -674,7 +674,7 @@ class Apache extends HttpConfigBase
|
||||
$webroot_text .= ' </Directory>' . "\n";
|
||||
$this->deactivated = true;
|
||||
} else {
|
||||
$webroot_text .= ' DocumentRoot "' . $domain['documentroot'] . "\"\n";
|
||||
$webroot_text .= ' DocumentRoot "' . rtrim($domain['documentroot'], "/") . "\"\n";
|
||||
$this->deactivated = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user