aboutsummaryrefslogtreecommitdiffstats
path: root/config/varnish64
diff options
context:
space:
mode:
Diffstat (limited to 'config/varnish64')
-rw-r--r--config/varnish64/varnish.inc13
-rw-r--r--config/varnish64/varnish_sync.xml2
2 files changed, 8 insertions, 7 deletions
diff --git a/config/varnish64/varnish.inc b/config/varnish64/varnish.inc
index 24891215..a7009c7d 100644
--- a/config/varnish64/varnish.inc
+++ b/config/varnish64/varnish.inc
@@ -378,7 +378,7 @@ EOFA;
function sync_package_varnish() {
global $config, $g;
- if($config['installedpackages']['varnishcustomvcl']['config'] != "") {
+ if(is_array($config['installedpackages']['varnishcustomvcl']['config'])) {
foreach($config['installedpackages']['varnishcustomvcl']['config'] as $vcl) {
if($vcl['vcl_recv_early'])
$vcl_recv_early = text_area_decode($vcl['vcl_recv_early']);
@@ -397,7 +397,8 @@ function sync_package_varnish() {
$vcl_recv_set_basic='#BASIC VCL RULES SETTING'."\n";
$vcl_recv_action_basic='#BASIC VCL RULES ACTIONS'."\n";
#$plataform=posix_uname();
- foreach($config['installedpackages']['varnishsettings']['config'] as $vcl) {
+ if (is_array($config['installedpackages']['varnishsettings']['config']))
+ foreach($config['installedpackages']['varnishsettings']['config'] as $vcl) {
if($vcl['fixgzip']){
$vcl_recv_set_basic.="\t#Fix gzip compression\n";
$vcl_recv_set_basic.="\t".'if (req.http.Accept-Encoding) {'."\n";
@@ -468,10 +469,10 @@ function sync_package_varnish() {
#set static content var
$vcl_recv_static_sufix=($vcl['staticache']=='no'?"pass":"lookup");
$vcl_recv_static ="\t#Enable static cache\n";
- $vcl_recv_static.="\t".'if (req.request=="GET" && req.url ~ "\.(css|js|txt|zip|pdf|rtf|flv|swf|html|htm)$") {'.$vcl_recv_static_prefix."\n\t\treturn($vcl_recv_static_sufix);\n\t\t}\n";
+ $vcl_recv_static.="\t".'if (req.request=="GET" && req.url ~ "\.(css|js|txt|zip|rtf|flv|swf|html|htm)$") {'.$vcl_recv_static_prefix."\n\t\treturn($vcl_recv_static_sufix);\n\t\t}\n";
$vcl_recv_static.="\t".'if (req.request=="GET" && req.url ~ "\.(gif|jpg|jpeg|bmp|png|ico|img|tga|wmf|mp3|ogg)$") {'.$vcl_recv_static_prefix."\n\t\treturn($vcl_recv_static_sufix);\n\t\t}\n";
$vcl_fetch_static ="#Enable static cache\n";
- $vcl_fetch_static.='if (req.url ~ "\.(css|js|txt|zip|pdf|rtf|flv|swf|html|htm)$") {'."\n\tunset beresp.http.set-cookie;\n\t}\n";
+ $vcl_fetch_static.='if (req.url ~ "\.(css|js|txt|zip|rtf|flv|swf|html|htm)$") {'."\n\tunset beresp.http.set-cookie;\n\t}\n";
$vcl_fetch_static.='if (req.url ~ "\.(gif|jpg|jpeg|bmp|png|ico|img|tga|wmf|mp3|ogg)$") {'."\n\tunset beresp.http.set-cookie;\n\t}\n";
switch ($vcl['staticache']){
@@ -723,7 +724,7 @@ function varnish_do_xmlrpc_sync($sync_to_ip, $password) {
$cli->setCredentials('admin', $password);
$resp = $cli->send($msg, "250");
if(!$resp) {
- $error = "A communications error occurred while attempting varnish XMLRPC sync with {$url}:{$port} (pfsense.exec_php).";
+ $error = "A communications error occurred while attempting varnish XMLRPC sync with {$url}:{$port} (exec_php).";
log_error($error);
file_notice("sync_settings", $error, "varnish Settings Sync", "");
} elseif($resp->faultCode()) {
@@ -733,7 +734,7 @@ function varnish_do_xmlrpc_sync($sync_to_ip, $password) {
log_error($error);
file_notice("sync_settings", $error, "varnish Settings Sync", "");
} else {
- log_error("varnish XMLRPC reload data success with {$url}:{$port} (pfsense.exec_php).");
+ log_error("varnish XMLRPC reload data success with {$url}:{$port} (exec_php).");
}
}
diff --git a/config/varnish64/varnish_sync.xml b/config/varnish64/varnish_sync.xml
index 02434389..e9594d44 100644
--- a/config/varnish64/varnish_sync.xml
+++ b/config/varnish64/varnish_sync.xml
@@ -86,7 +86,7 @@
<field>
<fielddescr>Automatically sync Varnish configuration changes</fielddescr>
<fieldname>synconchanges</fieldname>
- <description>pfSense will automatically sync changes to the hosts defined below.</description>
+ <description>Automatically sync changes to the hosts defined below.</description>
<type>checkbox</type>
</field>
<field>