من مبتدی هستم اگر سوالات عجیب می\رسم ببخشید
میخواستم بدونم که وقتی صفحات رو کش میکنیم با چه دستوری میشه محدود کرد مثلا بگیم تا ۴ گیگ کش کن بعد رفرش کن
یا اینکه اصلا نمیشه اینکارو کرد
ممنون
:)
Printable View
من مبتدی هستم اگر سوالات عجیب می\رسم ببخشید
میخواستم بدونم که وقتی صفحات رو کش میکنیم با چه دستوری میشه محدود کرد مثلا بگیم تا ۴ گیگ کش کن بعد رفرش کن
یا اینکه اصلا نمیشه اینکارو کرد
ممنون
:)
یه سوال دیگه هم یادم اومد چطور میشه لیست صفحاتی که در حال حاضر در حال استفادس رو لیست کرد و دید ؟ تو ترمینال منظورم هست
و اینکه چه صفحاتی کش شده کلا
Maxi Object
Tail
Cache Manager
یه خورده توضیح بیشتر میدید در مورد سوال دوم
من یه خورده مبتدی هستم مسیر اسکوید کجاس که tail کنم ؟
tail -f /var/log/squid/access.log
ممنون
من تنها چیزی که دیدم این بود
[CODE]
192.168.0.1 - - [28/Jul/2007:09:30:02 +0330] "GET http://192.168.0.1:3128/ HTTP/1.0" 403 1403 TCP_DENIED:NONE
192.168.0.1 - - [28/Jul/2007:09:30:02 +0330] "GET http://192.168.0.1:3128/ HTTP/1.1" 403 1504 TCP_MISS:DIRECT
192.168.0.1 - - [28/Jul/2007:09:30:03 +0330] "GET http://192.168.0.1:3128/favicon.ico HTTP/1.0" 403 1425 TCP_DENIED:NONE
192.168.0.1 - - [28/Jul/2007:09:30:03 +0330] "GET http://192.168.0.1:3128/favicon.ico HTTP/1.1" 403 1526 TCP_MISS:DIRECT
192.168.0.1 - - [28/Jul/2007:09:30:09 +0330] "GET http://192.168.0.1:3128/ HTTP/1.1" 403 1510 TCP_NEGATIVE_HIT:NONE
192.168.0.1 - - [28/Jul/2007:09:49:49 +0330] "GET http://192.168.0.1:3128/ HTTP/1.0" 403 1402 TCP_DENIED:NONE
192.168.0.1 - - [28/Jul/2007:09:49:49 +0330] "GET http://192.168.0.1:3128/ HTTP/1.1" 403 1502 TCP_MISS:DIRECT
[/CODE]
در ضمن من زیادم تو کانفیگش وارد نیستم شاید کانفیگمم مورد داشته باشه
من یه اینترنت دارم یه کام\یوترم تو لوکال کلا این کش رو برای تست دارم باهاش کار می کنم
اگر کانفیگه خوبی برای این چیزی که گفتم دارید یه راهنمایی ممنون میشم
Hit کش شده
Miss کش نشده از اینتر میگیره
اینایی که الان گفتید چی بود ؟
به خدا من تازه واردم یه توضیح بدید اینا چین اگر مشکل داره کجاشه ؟
راجب سوال اول...شما وقتی تنظیم می کنی 4 گیگ حجم کش خودش بعد وقتی داره پر میشه اضافی ها رو پاک میکنه
اونهایی هم که پیمان گفت برو تو لاگهایی که نوشتی ببین...توی هر خط معلوم میکنه از کش استفاده شده یا نه
این کش من هنوز هیچ صفحه ای رو کش نمی کنه مشکل از کجاس ؟
این دستور هم اجرا نمیشه چرا ؟
[CODE]acl mydomain srcdomain .google.com[/CODE]
بازم گوگل باز میشه و هیچ تفاوتی نمیکنه
در ضمن دستوری که فضای مورد استفادش رو محدود میکنیم میشه به طور کامل بگید
كش شدن ربطي به اين خطي كه نوشتي نداره
من تو کجای نوشته هام نوشتم ربط داره من گفتم هیچی کش نمیشه در ضمن اینم عمل نمی کنه بابا خیلی جالبه شما فکر کنم این همه \ست رو با این جوابا کسب کردی
شما احتمالا
http_accl_user_host_header off هست که گوگل باز می کنی و بقیه رو نه
در ضمن بابا علم غیب نداریم و جواب حتما نباید بدیم
شما مراحل کارتو بنویس و کانفیگ رو...2 تا پست اول شما اصلا نگفتین کار نمیکنه
[code]# Enable Trasparent Proxy In Squid 2.5.x Stable
#http_port 3128
#httpd_accel_host virtual
#httpd_accel_port 80
#httpd_accel_with_proxy off
#httpd_accel_uses_host_header on
# Enable Transparent Proxy In Squid 2.6.x Stable
http_port 192.168.0.1:3128 transparent
# Physical Memory Usage :>> memory ro kam bezar ta ba speed bala cache kone !
cache_mem 64 MB
# cache_dir diskd /usr/local/squid/cache 15360 16 256 Q1=72 Q2=64
#Or
#cache_dir ufs /usr/local/squid/cache 15360 16 256
#Dont want to log anything
#cache_access_log /dev/null
#cache_store_log none
#cache_log /dev/null
# Want To Log AnyThing
#cache dir
cache_dir aufs /var/spool/squid/ 100 16 256
# Or
#cache_dir diskd /var/spool/squid 3000 16 256 Q1=72 Q2=64
#coredump_dir /var/spool/squid
# cache logfile
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
cache_swap_log /var/log/squid/swap.log
# The Of Who Works With Squid ;;>> Better Be An Null User !!
cache_effective_user squid
cache_effective_group squid
# Ftp
ftp_user Info@Squid-Cache.org
refresh_pattern ^ftp: 1440 40% 10080
refresh_pattern ^gopher: 1440 20% 1440
refresh_pattern . 320 40% 43200
# Aborts
quick_abort_min 64 KB
quick_abort_max 512 KB
quick_abort_pct 70%
# More Commands
negative_ttl 5 minutes
connect_timeout 2 minutes
read_timeout 15 minutes
request_timeout 30 seconds
shutdown_lifetime 10 seconds
half_closed_clients off
cache_swap_high 100%
cache_swap_low 80%
shutdown_lifetime 3 seconds
# Authentication
#auth_param basic children 5
#auth_param basic realm Squid proxy-caching web server
#auth_param basic credentialsttl 2 hours
#authenticate_ttl 1 hour
#authenticate_ip_ttl 1 second
#request_header_max_size 7 KB
#client_lifetime 14 hours
# Listen ports
http_port 3128
icp_port 3130
# Cache defaults
cache_mgr ehsan310@hotmail.com
ftp_user ehsan310@hotmail.com
visible_hostname Cache
# More Rotates
logfile_rotate 3
forwarded_for on
emulate_httpd_log on
log_fqdn on
# Cache replacement policy
cache_replacement_policy GDSF
# Access List With Two Land In One
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl mydomain srcdomain .google.com
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 20 # Dftp
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 3000 # MAIL
acl CONNECT method CONNECT
#Http Access
http_access allow manager
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
#Icp Access
icp_access allow localhost
icp_access deny all
#Avoid caching cgi scripts
acl QUERY urlpath_regex cgi-bin
no_cache deny QUERY
#controle pahnaye band
acl magic_words1 url_regex -i 192.168
acl magic_words2 url_regex -i ftp .exe .mp3 .vqf .tar.gz .gz .rpm .zip .rar .avi .mpeg .mpe .mpg .qt .ram .rm .iso .raw .wav .mov
# Delay Pool
delay_pools 2
#B.W Controlling
delay_class 1 2
delay_parameters 1 128000/128000 12500/128000
delay_access 1 allow magic_words2
delay_class 2 2
delay_parameters 2 -1/-1 -1/-1
delay_access 2 allow magic_words1
#Cancel download if file is bigger than 10MB
#reply_body_max_size 1024 KB
#snmp stuff
acl snmppublic snmp_community public
snmp_access allow snmppublic localhost
snmp_access deny all
# Cache Peer
#cache_peer <proxy> parent 3128 3130 proxy-only
#cache_peer parent.foo.net parent 3128 3130 proxy-only
#cache_peer sib1.foo.net sibling 3128 3130 proxy-only
#cache_peer sib2.foo.net sibling 3128 3130 proxy-only
#icp_access allow lan
#icp_access deny all
# Microsoft Update Refresh Time
refresh_pattern http://*.windowsupdate.microsoft.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://office.microsoft.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://windowsupdate.microsoft.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://wxpsp2.microsoft.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://xpsp1.microsoft.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://w2ksp4.microsoft.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://download.microsoft.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://download.macromedia.com/ 0 80% 20160 reload-into-ims
refresh_pattern ftp://ftp.nai.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://ftp.software.ibm.com/ 0 80% 20160 reload-into-ims[/code]این کانفیگ از داخل همین فروم برداشتم یکی از کاربرا گزاشته بود . هیچ صفحه ای کش نمیشه و همه دایرکت هستن
cache_dir aufs /var/spool/squid/ 100 16 256
این محل ذخیره کردن Object
Cofnig خیلی برچسب داره که اکثرا زیادی هستند