Skip to content

Commit

Permalink
fix directory options for deactivated users, fixes #1704
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Kaufmann (d00p) <[email protected]>
  • Loading branch information
d00p committed Jan 23, 2017
1 parent 0eaa81b commit 8030aae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/jobs/cron_tasks.inc.http.10.apache.php
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,16 @@ protected function getWebroot($domain)
if ($domain['deactivated'] == '1' && Settings::Get('system.deactivateddocroot') != '') {
$webroot_text .= ' # Using docroot for deactivated users...' . "\n";
$webroot_text .= ' DocumentRoot "' . makeCorrectDir(Settings::Get('system.deactivateddocroot')) . "\"\n";
$webroot_text .= ' <Directory "' . makeCorrectDir(Settings::Get('system.deactivateddocroot')) . '">' . "\n";
// >=apache-2.4 enabled?
if (Settings::Get('system.apache24') == '1') {
$webroot_text .= ' Require all granted' . "\n";
$webroot_text .= ' AllowOverride All' . "\n";
} else {
$webroot_text .= ' Order allow,deny' . "\n";
$webroot_text .= ' allow from all' . "\n";
}
$webroot_text .= ' </Directory>' . "\n";
$this->_deactivated = true;
} else {
$webroot_text .= ' DocumentRoot "' . $domain['documentroot'] . "\"\n";
Expand Down

0 comments on commit 8030aae

Please sign in to comment.