歡迎您光臨本站 註冊首頁

squid3.0安裝后不能使用,請高手幫忙!

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

squid3.0安裝后不能使用,請高手幫忙!

我的代理伺服器只是在區域網內使用,不用考慮上互聯網的情況。這是squid 啟動信息:
2008/12/26 14:35:10| Starting Squid Cache version 3.0.STABLE11 for i686-pc-linux-gnu...
2008/12/26 14:35:10| Process ID 3888
2008/12/26 14:35:10| With 1024 file descriptors available
2008/12/26 14:35:10| Performing DNS Tests...
2008/12/26 14:35:10| Successful DNS name lookup tests...
2008/12/26 14:35:10| DNS Socket created at 0.0.0.0, port 32773, FD 5
2008/12/26 14:35:10| Adding nameserver 76.17.32.169 from /etc/resolv.conf
2008/12/26 14:35:10| Unlinkd pipe opened on FD 10
2008/12/26 14:35:10| Store logging disabled
2008/12/26 14:35:10| Swap maxSize 10240000 KB, estimated 787692 objects
2008/12/26 14:35:10| Target number of buckets: 39384
2008/12/26 14:35:10| Using 65536 Store buckets
2008/12/26 14:35:10| Max Mem  size: 131072 KB
2008/12/26 14:35:10| Max Swap size: 10240000 KB
2008/12/26 14:35:10| Version 1 of swap file with LFS support detected...
2008/12/26 14:35:10| Rebuilding storage in /tmp (CLEAN)
2008/12/26 14:35:10| Using Least Load store dir selection
2008/12/26 14:35:10| Current Directory is /var/spool/squid
2008/12/26 14:35:10| Loaded Icons.
2008/12/26 14:35:10| Accepting  HTTP connections at 0.0.0.0, port 3128, FD 11.
2008/12/26 14:35:10| HTCP Disabled.
2008/12/26 14:35:10| Configuring Parent 76.17.32.188/3128/3130
2008/12/26 14:35:10| Ready to serve requests.
2008/12/26 14:35:10| Done reading /tmp swaplog (0 entries)
2008/12/26 14:35:10| Finished rebuilding storage from disk.
2008/12/26 14:35:10|         0 Entries scanned
2008/12/26 14:35:10|         0 Invalid entries.
2008/12/26 14:35:10|         0 With invalid flags.
2008/12/26 14:35:10|         0 Objects loaded.
2008/12/26 14:35:10|         0 Objects expired.
2008/12/26 14:35:10|         0 Objects cancelled.
2008/12/26 14:35:10|         0 Duplicate URLs purged.
2008/12/26 14:35:10|         0 Swapfile clashes avoided.
2008/12/26 14:35:10|   Took 0.02 seconds (  0.00 objects/sec).
2008/12/26 14:35:10| Beginning Validation Procedure
2008/12/26 14:35:10|   Completed Validation Procedure
2008/12/26 14:35:10|   Validated 25 Entries
2008/12/26 14:35:10|   store_swap_size = 0
2008/12/26 14:35:11| storeLateRelease: released 0 objects

這是我的squid.conf:

http_port 76.17.32.188:3128 transparent vhost vport
cache_mem 128 MB
maximum_object_size_in_memory 512 KB
memory_replacement_policy lru
cache_dir ufs /tmp 10000 16 256
max_open_disk_fds 0
minimum_object_size 0 KB
maximum_object_size 4096 KB

logformat squid  %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
access_log /usr/local/squid/var/logs/access.log squid

cache_log /usr/local/squid/var/logs/cache.log

pid_filename /usr/local/squid/var/logs/squid.pid

cache_store_log none

visible_hostname lzweb
cache_peer 76.17.32.188 parent 3128 3130 no-query round-robin max-conn=32 originserver
acl lz_all src 0.0.0.0/0.0.0.0
http_access allow lz_all
icp_access allow lz_all
dbs_nameservers 76.17.32.155
dns_testnames internic.net usc.edu cs.colorado.edu mit.edu yale.edu
acl QUERY urlpath_regex cgi-bin .php .cgi .avi .wmv .rm .ram .mpg .mpeg .zip .exe
cache deny QUERY

cache_effective_user squid
cache_effective_group squid
《解決方案》

看樣子你的DNS設置有些問題,因為squid在內網,可能連不到公網,但是你卻使用公網的DNS來進行解析,肯定有問題
請編輯 vi /etc/resolv.conf
將nameserver后的IP改為你內網中的DNS伺服器的IP地址,你再試試

[火星人 ] squid3.0安裝后不能使用,請高手幫忙!已經有164次圍觀

http://coctec.com/docs/service/show-post-25033.html