|
|
@@ -68,6 +68,10 @@ 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 = '30m';
|
|
|
+}
|
|
|
$v_proxy = $data[$v_domain]['PROXY'];
|
|
|
$v_proxy_template = $data[$v_domain]['PROXY'];
|
|
|
$v_proxy_ext = str_replace(',', ', ', $data[$v_domain]['PROXY_EXT']);
|
|
|
@@ -329,11 +333,14 @@ if (!empty($_POST['save'])) {
|
|
|
}
|
|
|
|
|
|
// Enable/Disable nginx cache
|
|
|
- if (($_SESSION['WEB_SYSTEM'] == 'nginx') && ($v_nginx_cache != $_POST['v_nginx_cache'] ) && (empty($_SESSION['error_msg']))) {
|
|
|
+ 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' ) {
|
|
|
- exec (HESTIA_CMD."v-add-fastcgi-cache ".$v_username." ".escapeshellarg($v_domain), $output, $return_var);
|
|
|
- check_return_code($return_var,$output);
|
|
|
- unset($output);
|
|
|
+ if (!empty ($_POST['v_nginx_cache_length'])){
|
|
|
+ echo $_POST['v_nginx_cache_length'] = "30m";
|
|
|
+ }
|
|
|
+ exec (HESTIA_CMD."v-add-fastcgi-cache ".$v_username." ".escapeshellarg($v_domain).' '. escapeshellarg($_POST['v_nginx_cache_length']) , $output, $return_var);
|
|
|
+ check_return_code($return_var,$output);
|
|
|
+ unset($output);
|
|
|
} else {
|
|
|
exec (HESTIA_CMD."v-delete-fastcgi-cache ".$v_username." ".escapeshellarg($v_domain), $output, $return_var);
|
|
|
check_return_code($return_var,$output);
|