亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標題: squid3.0代理配置故障 [打印本頁]

作者: bigbigsh    時間: 2009-01-05 08:53
標題: squid3.0代理配置故障
[root@hwt ~]# /usr/local/squid/sbin/squid -N -d1
2009/01/06 05:43:44| Warning: empty ACL: acl name url_regex -i
2009/01/06 05:43:44| WARNING: '0.0.0.0/0.0.0.0' is a subnetwork of '0.0.0.0/0.0.0.0'
2009/01/06 05:43:44| WARNING: because of this '0.0.0.0/0.0.0.0' is ignored to keep splay tree searching predictable
2009/01/06 05:43:44| WARNING: You should probably remove '0.0.0.0/0.0.0.0' from the ACL named 'all'
WARNING: Cannot write log file: none
none: Permission denied
         messages will be sent to 'stderr'.
2009/01/06 05:43:44| Squid is already running!  Process ID 2690
作者: bigbigsh    時間: 2009-01-05 09:05
日志里報錯,不知道什么愿因
Jan  6 05:57:43 hwt squid[20100]: storeLateRelease: released 0 objects
Jan  6 05:57:45 hwt squid: Warning: empty ACL: acl name url_regex -i
Jan  6 05:57:45 hwt squid: WARNING: '0.0.0.0/0.0.0.0' is a subnetwork of '0.0.0.0/0.0.0.0'
Jan  6 05:57:45 hwt squid: WARNING: because of this '0.0.0.0/0.0.0.0' is ignored to keep splay tree searching predictable
Jan  6 05:57:45 hwt squid: WARNING: You should probably remove '0.0.0.0/0.0.0.0' from the ACL named 'all'
Jan  6 05:57:45 hwt squid[20108]: Squid is already running!  Process ID 20100
[root@hwt log]#
作者: liang3391    時間: 2009-01-05 09:08
你這些報錯前面只是warning

none: Permission denied
         messages will be sent to 'stderr'.(很明顯是權限問題導致的 從你提供的報錯信息我不能準確判斷是什么對方權限導致的,貌似是log文件。
作者: bigbigsh    時間: 2009-01-05 09:47
[root@hwt logs]# /usr/local/squid/sbin/squid  -N -d1
2009/01/06 06:39:23| Warning: empty ACL: acl name url_regex -i
2009/01/06 06:39:23| WARNING: '0.0.0.0/0.0.0.0' is a subnetwork of '0.0.0.0/0.0.0.0'
2009/01/06 06:39:23| WARNING: because of this '0.0.0.0/0.0.0.0' is ignored to keep splay tree searching predictable
2009/01/06 06:39:23| WARNING: You should probably remove '0.0.0.0/0.0.0.0' from the ACL named 'all'
2009/01/06 06:39:23| Starting Squid Cache version 3.0.STABLE1 for x86_64-unknown-linux-gnu...
2009/01/06 06:39:23| Process ID 20138
2009/01/06 06:39:23| With 1024 file descriptors available
2009/01/06 06:39:23| Performing DNS Tests...
2009/01/06 06:39:24| Successful DNS name lookup tests...
2009/01/06 06:39:24| helperOpenServers: Starting 5 'dnsserver' processes
2009/01/06 06:39:24| Unlinkd pipe opened on FD 13
2009/01/06 06:39:24| Store logging disabled
2009/01/06 06:39:24| Swap maxSize 10240000 KB, estimated 787692 objects
2009/01/06 06:39:24| Target number of buckets: 39384
2009/01/06 06:39:24| Using 65536 Store buckets
2009/01/06 06:39:24| Max Mem  size: 1048576 KB
2009/01/06 06:39:24| Max Swap size: 10240000 KB
2009/01/06 06:39:24| Version 1 of swap file without LFS support detected...
2009/01/06 06:39:24| Rebuilding storage in /usr/local/squid/cache (DIRTY)
2009/01/06 06:39:24| Version 1 of swap file without LFS support detected...
2009/01/06 06:39:24| Rebuilding storage in /home/cache (DIRTY)
2009/01/06 06:39:24| Using Least Load store dir selection
2009/01/06 06:39:24| Current Directory is /usr/local/squid/var/log
作者: bigbigsh    時間: 2009-01-05 09:58
我把我的SQUID.CONF帖出來大家?guī)臀铱纯丛虺鲈谀抢?br />
http_port 3128 transparent
cache_mem 1 GB
maximum_object_size 9000 KB
maximum_object_size_in_memory 6128 KB
dns_nameservers 196.196.0.252
cache_dir ufs /usr/local/squid/cache 5000 32 512
cache_dir ufs /home/cache 5000 32 512
error_directory /usr/local/squid/share/errors/Simplify_Chinese
acl nocache urlpath_regex cookie.*\.php *\.jsp *\.asp *\.pl *\.cgi
no_cache deny nocache
acl audio urlpath_regex -i .torrent$ .avi$ .mp3$ .mp4$
http_access deny audio
acl name url_regex -i
http_access deny name
cache_access_log none
cache_log none
cache_store_log none
acl localhost src 196.196.0.0/24
http_access allow localhost
acl all src 0.0.0.0/0.0.0.0
http_access deny all
acl safe port 80 21 443 3128
http_access allow safe
cache_effective_user squid
cache_effective_group squid
cache_mgr worldrestart@yahoo.com.cn
acl conncount maxconn 5
visible_hostname LinuxProxyServer
icon_directory /usr/local/squid/share/icons
ipcache_size 2024
ipcache_low 90
ipcache_high 95
fqdncache_size 2024
作者: liuhanzhao    時間: 2009-01-05 15:11
acl all src 0.0.0.0/0.0.0.0
這個在3.0以上版本是不需要了
默認3.0中就已經(jīng)把all定義了,所以只需要后面使用就行了
作者: bigbigsh    時間: 2009-01-05 20:47
謝謝liuhanzhao 兄   的回復.  我現(xiàn)在還有一點點小問題,下面的規(guī)則問題出在那里

[root@hwt ~]# /sbin/iptables -A OUTPUT -d 0/0 -p ALL --dport 53 -j ACCEPT
iptables v1.3.5: Unknown arg `--dport'
Try `iptables -h' or 'iptables --help' for more information.
[root@hwt ~]#
作者: bigbigsh    時間: 2009-01-06 12:59
請問大家我這樣參數(shù)合理嗎?

./configure --prefix=/usr/local/squid
--enable-poll
--disable-internal-dns
--disable-wccp
--disable-wccpv2
--disable-carp
--disable-ident-lookups
--enable-dlmalloc
--enable-truncate
--enable-stacktrace
--enable-storeio=aufs,coss,diskd,ufs,null
--enable-linux-netfilter         //要想實現(xiàn)透明代理,必須選取這個參數(shù),啟用linux netfilter支持
--enable-err-language=Simplify_Chinese
--enable-default-err-languages=Simplify_Chinese
--enable-arp-acl
--enable-snmp
--enable-async-io=180       //1G內(nèi)存,并且是雙核的選180,否則選100以下
--enable-cahce-digests      
--enable-underscore          //允許請求的URL出現(xiàn)下劃線
--enable-gnuregex  
--enable-icmp
--enable-kill-parent-hack
作者: liuhanzhao    時間: 2009-01-06 14:04
--enable-linux-netfilter         //要想實現(xiàn)透明代理,必須選取這個參數(shù),啟用linux netfilter支持
不用這個參數(shù)我同樣可以做透明代理的
其他都是ok的
作者: bigbigsh    時間: 2009-01-07 09:21
謝謝liuhanzhao    兄的回復,小弟還有一個問題,SQUID3.0是不是不支持以下三個規(guī)則?..我在squid.conf 加下面三個會報錯.不知道是什么原因.
refresh_pattern . 0 20% 4320 override-expire override-lastmod reload-into-ims ignore-reload
broken_vary_encoding allow apache
header_access header allow all


[root@hwt ~]# /usr/local/squid/sbin/squid  -N -d1
2009/01/08 06:12:50| parseConfigFile: 'squid.conf' line 58 unrecognized: 'broken_vary_encoding allow apache'
2009/01/08 06:12:50| parseConfigFile: 'squid.conf' line 60 unrecognized: 'header_access header allow all'
2009/01/08 06:12:50| WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'reload-into-ims' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'ignore-reload' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| Squid is already running!  Process ID 21532
[root@hwt ~]#


下面是我的腳本
http_port 3128 transparent
cache_mem 256 MB
dns_nameservers 196.196.0.252
fqdncache_size 2024
maximum_object_size_in_memory 2 MB
#memory_replacement_policy heap LFUDA
#cache_replacement_policy heap LFUDA
cache_dir ufs /usr/local/squid/cache 5000 32 512
cache_dir ufs /home/cache 5000 32 512
error_directory /usr/local/squid/share/errors/Simplify_Chinese
acl nocache urlpath_regex cookie.*\.php *\.jsp *\.asp *\.pl *\.cgi
no_cache deny nocache
acl audio urlpath_regex -i .torrent$ .avi$ .mp3$ .mp4$
http_access deny audio
acl download urlpath_regex -i \.zip$ \.exe$ \.mp3$ \.ra$ \.avi$ \.avi$ \.rar$ \.rvmb$ \.mpe$
http_access deny download
acl localhost src 196.196.0.0/24
http_access allow localhost
http_access deny all
acl safe port 80 21 443 3128
http_access allow safe
cache_effective_user squid
cache_effective_group squid
icp_port 0
cache_mgr worldrestart@yahoo.com.cn
acl OverConnLimit maxconn 16
http_access deny OverConnLimit
acl conncount maxconn 5
visible_hostname 196.196.0.252
icon_directory /usr/local/squid/share/icons
max_open_disk_fds 0
minimum_object_size 1 KB
maximum_object_size 20 MB
cache_swap_low 90
cache_swap_high 95
ipcache_size 2024
ipcache_low 90
ipcache_high 95
access_log /usr/local/squid/var/logs/access.log squid
cache_log /usr/local/squid/var/logs/cache.log squid
cache_store_log none
emulate_httpd_log on
#refresh_pattern . 0 20% 4320 override-expire override-lastmod reload-into-ims ignore-reload
acl buggy_server url_regex ^http://.... http://
broken_posts allow buggy_server
acl apache rep_header Server ^Apache
#broken_vary_encoding allow apache
request_entities off
#header_access header allow all
relaxed_header_parser on
client_lifetime 120 minute
cache_peer 196.196.0.252 parent 80 0 no-query default multicast-responder no-netdb-exchange
cache_peer_domain 196.196.0.252
hostname_aliases 196.196.0.252
error_directory /usr/local/squid/share/errors/Simplify_Chinese
always_direct allow all
ignore_unknown_nameservers on
coredump_dir  /var/log/squid
half_closed_clients off
buffered_logs on

[ 本帖最后由 bigbigsh 于 2009-1-7 09:29 編輯 ]
作者: bigbigsh    時間: 2009-01-07 14:28
liuhanzhao    兄為什么下面幾個都不能用..
#memory_replacement_policy heap LFUDA
#cache_replacement_policy heap LFUDA
#refresh_pattern . 0 20% 4320 override-expire override-lastmod reload-into-ims ignore-reload
#broken_vary_encoding allow apache
#header_access header allow all
作者: bigbigsh    時間: 2009-01-07 15:51
這是什么原因啊..

[root@hwt squid]# /usr/local/squid/sbin/squid -N -dl
2009/01/08 12:46:53| parseConfigFile: 'squid.conf' line 47 unrecognized: 'broken_vary_encoding allow apache'
2009/01/08 12:46:53| parseConfigFile: 'squid.conf' line 49 unrecognized: 'header_access header allow all'
2009/01/08 12:46:53| WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP
2009/01/08 12:46:53| WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP
2009/01/08 12:46:53| WARNING: use of 'reload-into-ims' in 'refresh_pattern' violates HTTP
2009/01/08 12:46:53| WARNING: use of 'ignore-reload' in 'refresh_pattern' violates HTTP
2009/01/08 12:46:53| Squid is already running!  Process ID 24049
[root@hwt squid]#
作者: liuhanzhao    時間: 2009-01-07 15:58
2009/01/08 06:12:50| parseConfigFile: 'squid.conf' line 58 unrecognized: 'broken_vary_encoding allow apache'
2009/01/08 06:12:50| parseConfigFile: 'squid.conf' line 60 unrecognized: 'header_access header allow all'

這兩個報錯都是squid不識別的配置
broken_vary在3.0中已經(jīng)默認就帶了,所以根本不用寫這條了
后面那個我沒用過
2009/01/08 06:12:50| WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'reload-into-ims' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'ignore-reload' in 'refresh_pattern' violates HTTP
剩下這些只是警告,不是報錯,就是說用這4個參數(shù)會打破http的規(guī)則,不算報錯
作者: bigbigsh    時間: 2009-01-08 11:00
liuhanzhao兄能跟你交個朋友嗎?我的QQ是499387551,那我什么樣才能讓它不warning呢?還有一個問題我如何關掉土豆網(wǎng)上的視頻..我想把網(wǎng)頁上的視頻播放器關了.不讓它顯示出...這樣就能關掉所有的在線視頻了..
2009/01/08 06:12:50| WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'reload-into-ims' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'ignore-reload' in 'refresh_pattern' violates HTTP
作者: bigbigsh    時間: 2009-01-08 15:18
誰幫我看看我這命中是不是有問題

[root@hwt ~]# /usr/local/squid/bin/squidclient -p 3128 -h 196.196.0.8 mgr:info
HTTP/1.0 200 OK
Server: squid/3.0.STABLE1
Mime-Version: 1.0
Date: Fri, 09 Jan 2009 04:11:36 GMT
Content-Type: text/plain
Expires: Fri, 09 Jan 2009 04:11:36 GMT
Last-Modified: Fri, 09 Jan 2009 04:11:36 GMT
X-Cache: MISS from 196.196.0.8
Via: 1.0 196.196.0.8 (squid/3.0.STABLE1)
Proxy-Connection: close

Squid Object Cache: Version 3.0.STABLE1
Start Time:     Fri, 09 Jan 2009 02:47:19 GMT
Current Time:   Fri, 09 Jan 2009 04:11:36 GMT
Connection information for squid:
        Number of clients accessing cache:      37
        Number of HTTP requests received:       14124
        Number of ICP messages received:        0
        Number of ICP messages sent:    0
        Number of queued ICP replies:   0
        Number of HTCP messages received:       0
        Number of HTCP messages sent:   0
        Request failure ratio:   0.00
        Average HTTP requests per minute since start:   167.6
        Average ICP messages per minute since start:    0.0
        Select loop called: 1497646 times, 3.376 ms avg
Cache information for squid:
        Hits as % of all requests:      5min: 7.4%, 60min: 10.6%
        Hits as % of bytes sent:        5min: 6.6%, 60min: 9.1%
        Memory hits as % of hit requests:       5min: 6.6%, 60min: 7.6%
        Disk hits as % of hit requests: 5min: 14.5%, 60min: 21.3%
        Storage Swap size:      244880 KB
        Storage Swap capacity:   2.4% used, 97.6% free
        Storage Mem size:       -23480 KB
        Storage Mem capacity:   29.0% used, 71.0% free
        Mean Object Size:       15.90 KB
        Requests given to unlinkd:      95
Median Service Times (seconds)  5 min    60 min:
        HTTP Requests (All):   0.10857  0.10281
        Cache Misses:          0.12783  0.12106
        Cache Hits:            0.00000  0.00000
        Near Hits:             0.04277  0.05331
        Not-Modified Replies:  0.00000  0.00000
        DNS Lookups:           0.01609  0.01464
        ICP Queries:           0.00000  0.00000
Resource usage for squid:
        UP Time:        5056.657 seconds
        CPU Time:       12.215 seconds
        CPU Usage:      0.24%
        CPU Usage, 5 minute avg:        0.36%
        CPU Usage, 60 minute avg:       0.23%
        Process Data Segment Size via sbrk(): 15912 KB
        Maximum Resident Size: 0 KB
        Page faults with physical i/o: 1
Memory usage for squid via mallinfo():
        Total space in arena:   16184 KB
        Ordinary blocks:        16061 KB     12 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:         83948 KB    603 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:     122 KB
        Total in use:          100009 KB 100%
        Total free:               122 KB 0%
        Total size:            100132 KB
Memory accounted for:
        Total accounted:        89385 KB  89%
        memPool accounted:      89385 KB  89%
        memPool unaccounted:    10746 KB  11%
        memPoolAlloc calls:   3728310
        memPoolFree calls:    3537558
File descriptor usage for squid:
        Maximum number of file descriptors:   1024
        Largest file desc currently in use:    255
        Number of file desc currently in use:  201
        Files queued for open:                   0
        Available number of file descriptors:  823
        Reserved number of file descriptors:   100
        Store Disk files open:                   0
Internal Data Structures:
         15528 StoreEntries
          3767 StoreEntries with MemObjects
          3766 Hot Object Cache Items
         15402 on-disk objects
[root@hwt ~]#




歡迎光臨 Chinaunix (http://72891.cn/) Powered by Discuz! X3.2