aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/squid_ng.inc16
-rw-r--r--packages/squid_ng.xml6
2 files changed, 17 insertions, 5 deletions
diff --git a/packages/squid_ng.inc b/packages/squid_ng.inc
index 0b4aa855..32cf68ca 100644
--- a/packages/squid_ng.inc
+++ b/packages/squid_ng.inc
@@ -44,7 +44,8 @@ function global_write_squid_config()
$active_interface = $config['installedpackages']['squid']['config'][0]['active_interface'];
$transparent_proxy = $config['installedpackages']['squid']['config'][0]['transparent_proxy'];
$log_enabled = $config['installedpackages']['squid']['config'][0]['log_enabled'];
- $urlfier_enable = $config['installedpackages']['squid']['config'][0]['urlfilter_enable'];
+ $urlfier_enable = $config['installedpackages']['squid']['config'][0]['urlfilter_enable'];
+ $accesslog_disabled = $config['installedpackages']['squid']['config'][0]['accesslog_disabled'];
$log_query_terms = $config['installedpackages']['squid']['config'][0]['log_query_terms'];
$log_user_agents = $config['installedpackages']['squid']['config'][0]['log_user_agents'];
$proxy_port = $config['installedpackages']['squid']['config'][0]['proxy_port'];
@@ -221,10 +222,15 @@ function global_write_squid_config()
}
$config_array[] = 'cache_replacement_policy ' . $cache_replacement . "\n\n";
unset($cache_replacement);
-
- $config_array[] = 'cache_access_log /var/log/access.log' . "\n";
+
+ if (isset($accesslog_disabled) && ($accesslog_disabled == "on")) {
+ $config_array[] = 'cache_access_log none' . "\n";
+ } else {
+ $config_array[] = 'cache_access_log /var/log/access.log' . "\n";
+ }
$config_array[] = 'cache_log /var/log/cache.log' . "\n";
$config_array[] = 'cache_store_log none' . "\n";
+ unset($accesslog_disabled);
unset($log_enabled);
if (isset($log_query_terms) && ($log_query_terms == "on")) {
@@ -956,8 +962,8 @@ function write_static_squid_config() {
fwrite($fout, "cache_replacement_policy heap GDSF\n");
fwrite($fout, "\n");
- fwrite($fout, "cache_access_log /dev/null\n");
- fwrite($fout, "cache_log /dev/null\n");
+ fwrite($fout, "cache_access_log none\n");
+ fwrite($fout, "cache_log none\n");
fwrite($fout, "cache_store_log none\n");
fwrite($fout, "\n");
diff --git a/packages/squid_ng.xml b/packages/squid_ng.xml
index 8f1c5719..6d98f00f 100644
--- a/packages/squid_ng.xml
+++ b/packages/squid_ng.xml
@@ -114,6 +114,12 @@
<type>checkbox</type>
</field>
<field>
+ <fielddescr>Disable Access Log</fielddescr>
+ <fieldname>accesslog_disabled</fieldname>
+ <description>Disable the access log entirely. By default, Squid keeps a log of all requests it processes in /var/log/access.log. This can grow to be fairly large. If you do not require this logging, check this box to disable.</description>
+ <type>checkbox</type>
+ </field>
+ <field>
<fielddescr>Log Query Terms</fielddescr>
<fieldname>log_query_terms</fieldname>
<description>This will log the complete URL rather than the part of the URL containing dynamic queries.</description>