|
|
@@ -68,10 +68,13 @@ if (empty($v_letsencrypt)) $v_letsencrypt = 'no';
|
|
|
$v_ssl_home = $data[$v_domain]['SSL_HOME'];
|
|
|
$v_backend_template = $data[$v_domain]['BACKEND'];
|
|
|
$v_nginx_cache = $data[$v_domain]['FASTCGI_CACHE'];
|
|
|
-$v_nginx_cache_length = $data[$v_domain]['FASTCGI_CACHE_LENGTH'];
|
|
|
-if(empty($v_nginx_cache_length)){
|
|
|
+$v_nginx_cache_length = $data[$v_domain]['FASTCGI_DURATION'];
|
|
|
+$v_nginx_cache_check = ''
|
|
|
+if(empty($v_nginx_duration)){
|
|
|
$v_nginx_cache_length = '30m';
|
|
|
+ $v_nginx_cache_check = 'on';
|
|
|
}
|
|
|
+;
|
|
|
$v_proxy = $data[$v_domain]['PROXY'];
|
|
|
$v_proxy_template = $data[$v_domain]['PROXY'];
|
|
|
$v_proxy_ext = str_replace(',', ', ', $data[$v_domain]['PROXY_EXT']);
|
|
|
@@ -333,12 +336,12 @@ if (!empty($_POST['save'])) {
|
|
|
}
|
|
|
|
|
|
// Enable/Disable nginx cache
|
|
|
- if (($_SESSION['WEB_SYSTEM'] == 'nginx') && ($v_nginx_cache != $_POST['v_nginx_cache'] ) && ($v_nginx_cache_length != $_POST['v_nginx_cache_length'] && $_POST['v_nginx_cache'] = "yes" ) && (empty($_SESSION['error_msg']))) {
|
|
|
- if ( $_POST['v_nginx_cache'] == 'yes' ) {
|
|
|
+ if (($_SESSION['WEB_SYSTEM'] == 'nginx') && ($v_nginx_cache_check != $_POST['v_nginx_cache_check'] ) && ($v_nginx_cache_length != $_POST['v_nginx_cache_length'] && $_POST['v_nginx_cache'] = "yes" ) && (empty($_SESSION['error_msg']))) {
|
|
|
+ if ( $_POST['v_nginx_cache_check'] == 'on' ) {
|
|
|
if (!empty ($_POST['v_nginx_cache_length'])){
|
|
|
- echo $_POST['v_nginx_cache_length'] = "30m";
|
|
|
+ echo $_POST['v_nginx_cache_length'] = "2m";
|
|
|
}
|
|
|
- exec (HESTIA_CMD."v-add-fastcgi-cache ".$v_username." ".escapeshellarg($v_domain).' '. escapeshellarg($_POST['v_nginx_cache_length']) , $output, $return_var);
|
|
|
+ exec (HESTIA_CMD."v-add-fastcgi-cache ".$v_username." ".escapeshellarg($v_domain).' '. escapeshellarg($_POST['v_nginx_duration']) , $output, $return_var);
|
|
|
check_return_code($return_var,$output);
|
|
|
unset($output);
|
|
|
} else {
|
|
|
@@ -346,7 +349,7 @@ if (!empty($_POST['save'])) {
|
|
|
check_return_code($return_var,$output);
|
|
|
unset($output);
|
|
|
}
|
|
|
- $restart_proxy = 'yes';
|
|
|
+ $restart_web = 'yes';
|
|
|
}
|
|
|
|
|
|
// Delete proxy support
|
|
|
@@ -355,7 +358,7 @@ if (!empty($_POST['save'])) {
|
|
|
check_return_code($return_var,$output);
|
|
|
unset($output);
|
|
|
unset($v_proxy);
|
|
|
- $restart_proxy = 'yes';
|
|
|
+ $restart_web = 'yes';
|
|
|
}
|
|
|
|
|
|
// Change proxy template / Update extension list
|