📄 edit_logs.cgi
字号:
#!/usr/local/bin/perl# edit_logs.cgi# A form for editing logging optionsrequire './squid-lib.pl';&header("Logging", "", undef, 0, 0, 0, &restart_button());print "<hr>\n";$conf = &get_config();print "<form action=save_logs.cgi>\n";print "<table border width=100%>\n";print "<tr $tb> <td><b>Logging and Logfile Options</b></td> </tr>\n";print "<tr $cb> <td><table width=100%>\n";print "<tr>\n";print &opt_input("Access log file", "cache_access_log", $conf, "Default", 20);print &opt_input("Debug log file", "cache_log", $conf, "Default", 20);print "</tr>\n";print "<tr>\n";print &opt_input("Storage log file", "cache_store_log", $conf, "Default", 20);print &opt_input("Cache metadata file", "cache_swap_log", $conf, "Default", 20);print "</tr>\n";print "<tr>\n";print &choice_input("Use HTTPD log format?", "emulate_httpd_log", $conf, "off", "Yes", "on", "No", "off");print &choice_input("Log MIME headers?", "log_mime_hdrs", $conf, "off", "Yes", "on", "No", "off");print "</tr>\n";print "<tr>\n";print &opt_input("User agent log file", "useragent_log", $conf, "None", 20);print &opt_input("PID file", "pid_filename", $conf, "Default", 20);print "</tr>\n";if ($squid_version >= 2.2) { @ident = &find_config("ident_lookup_access", $conf); foreach $i (@ident) { local @v = @{$i->{'values'}}; if ($v[0] eq "allow") { map { $ila{$_}++ } @v[1..$#v]; } elsif ($v[0] eq "deny" && $v[1] ne "all") { $bad_ident++; } } if (!$bad_ident) { print "<tr> <td valign=top><b>Perform RFC931 ident ", "lookups for ACLs</b></td> <td colspan=3>\n"; @acls = &find_config("acl", $conf); foreach $acl (@acls) { $aclv = $acl->{'values'}->[0]; printf "<input type=checkbox name=ident_lookup_access ". "value=$aclv %s>$aclv\n", $ila{$aclv} ? "checked" : ""; } print "</td> </tr>\n"; } else { print "<input type=hidden name=complex_ident value=1>\n"; } print "<tr>\n"; print &opt_time_input("RFC931 ident timeout", "ident_timeout", $conf, "Default", 6); }else { print "<tr>\n"; print &choice_input("Do RFC931 ident lookups?", "ident_lookup", $conf, "off", "Yes", "on", "No", "off"); }print &choice_input("Log full hostnames?", "log_fqdn", $conf, "off", "Yes", "on", "No", "off");print "</tr>\n";print "<tr>\n";print &opt_input("Logging netmask", "client_netmask", $conf, "Default", 15);print &opt_input("Debug options", "debug_options", $conf, "Default", 15);print "</tr>\n";if ($squid_version >= 2) { print "<tr>\n"; print &opt_input("MIME headers table", "mime_table", $conf, "Default", 20); print "</tr>\n"; }print "</table></td></tr></table><br>\n";print "<input type=submit value=Save></form>\n";print "<hr>\n";&footer("", "squid index");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -