add domain flag to avoid generation of nginx try_files directive in webroot which is not suitable for some applications; fixes #461
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -429,6 +429,7 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
}
|
||||
|
||||
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
|
||||
$notryfiles = isset($_POST['notryfiles']) && (int)$_POST['notryfiles'] == 1 ? 1 : 0;
|
||||
validate($_POST['documentroot'], 'documentroot');
|
||||
|
||||
// If path is empty and 'Use domain name as default value for DocumentRoot path' is enabled in settings,
|
||||
@@ -451,6 +452,7 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
$zonefile = '';
|
||||
$dkim = '1';
|
||||
$specialsettings = '';
|
||||
$notryfiles = '0';
|
||||
}
|
||||
|
||||
if ($userinfo['caneditphpsettings'] == '1' || $userinfo['change_serversettings'] == '1') {
|
||||
@@ -801,6 +803,7 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
'mod_fcgid_starter' => $mod_fcgid_starter,
|
||||
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
|
||||
'specialsettings' => $specialsettings,
|
||||
'notryfiles' => $notryfiles,
|
||||
'registration_date' => $registration_date,
|
||||
'termination_date' => $termination_date,
|
||||
'issubof' => $issubof,
|
||||
@@ -850,6 +853,7 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
'openbasedir' => $openbasedir,
|
||||
'speciallogfile' => $speciallogfile,
|
||||
'specialsettings' => $specialsettings,
|
||||
'notryfiles' => $notryfiles,
|
||||
'ssl_redirect' => $ssl_redirect,
|
||||
'add_date' => time(),
|
||||
'registration_date' => $registration_date,
|
||||
@@ -889,6 +893,7 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
`openbasedir` = :openbasedir,
|
||||
`speciallogfile` = :speciallogfile,
|
||||
`specialsettings` = :specialsettings,
|
||||
`notryfiles` = :notryfiles,
|
||||
`ssl_redirect` = :ssl_redirect,
|
||||
`add_date` = :add_date,
|
||||
`registration_date` = :registration_date,
|
||||
@@ -1338,6 +1343,7 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
|
||||
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
|
||||
$ssfs = (isset($_POST['specialsettingsforsubdomains']) && intval($_POST['specialsettingsforsubdomains']) == 1) ? 1 : 0;
|
||||
$notryfiles = isset($_POST['notryfiles']) && (int)$_POST['notryfiles'] == 1 ? 1 : 0;
|
||||
$documentroot = validate($_POST['documentroot'], 'documentroot');
|
||||
|
||||
if ($documentroot == '') {
|
||||
@@ -1359,6 +1365,7 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
$dkim = $result['dkim'];
|
||||
$specialsettings = $result['specialsettings'];
|
||||
$ssfs = (empty($specialsettings) ? 0 : 1);
|
||||
$notryfiles = $result['notryfiles'];
|
||||
$documentroot = $result['documentroot'];
|
||||
}
|
||||
|
||||
@@ -1655,6 +1662,7 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
|
||||
'specialsettings' => $specialsettings,
|
||||
'specialsettingsforsubdomains' => $ssfs,
|
||||
'notryfiles' => $notryfiles,
|
||||
'registration_date' => $registration_date,
|
||||
'termination_date' => $termination_date,
|
||||
'issubof' => $issubof,
|
||||
@@ -1697,6 +1705,7 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
$mod_fcgid_starter != $result['mod_fcgid_starter'] ||
|
||||
$mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests'] ||
|
||||
$specialsettings != $result['specialsettings'] ||
|
||||
$notryfiles != $result['notryfiles'] ||
|
||||
$aliasdomain != $result['aliasdomain'] ||
|
||||
$issubof != $result['ismainbutsubto'] ||
|
||||
$email_only != $result['email_only'] ||
|
||||
@@ -1855,6 +1864,7 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
$update_data['mod_fcgid_starter'] = $mod_fcgid_starter;
|
||||
$update_data['mod_fcgid_maxrequests'] = $mod_fcgid_maxrequests;
|
||||
$update_data['specialsettings'] = $specialsettings;
|
||||
$update_data['notryfiles'] = $notryfiles;
|
||||
$update_data['registration_date'] = $registration_date;
|
||||
$update_data['termination_date'] = $termination_date;
|
||||
$update_data['ismainbutsubto'] = $issubof;
|
||||
@@ -1889,6 +1899,7 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
`mod_fcgid_starter` = :mod_fcgid_starter,
|
||||
`mod_fcgid_maxrequests` = :mod_fcgid_maxrequests,
|
||||
`specialsettings` = :specialsettings,
|
||||
`notryfiles` = :notryfiles,
|
||||
`registration_date` = :registration_date,
|
||||
`termination_date` = :termination_date,
|
||||
`ismainbutsubto` = :ismainbutsubto,
|
||||
|
||||
Reference in New Issue
Block a user