squid help
hey need help with this
i try to use acl 6arab url_regex http://www.saidacity.net no_cache allow 6arab and try refresh_pattern ^http://www.saidacity.net 0 80% 99999 ignore-no-cache ignore-no-store it sometimes give me TCP_HIT and sometimes TCP_MISS i try different browser not only this site , different site and when it give me TCP_HIT , when i open the site, it's some how slow!! one more thing, if i cache file.exe for example and i change the min age which is 0 to 9999 , and restart squid, does the object expire? since when i change the min age all objects .exe are expired :( Thanks for your help and hope can someone help me thx alot :) |
What are your trying to achieve??
what are the defaults? and have you commented them out? what the order of the refresh_pattern line? show me your complete squid.conf Please note: by default, regular expressions are CASE-SENSITIVE. To make them case-insensitive, use the -i option. From Squid documentation: Quote:
|
Quote:
all i want to cache like sometimes site have huge pic so to cache them but not working even i want to enforce to cache facebook on startup like the pics banners and so on not working :( check my config ///////////acl manager proto cache_object acl localhost src 127.0.0.1/32 acl to_localhost dst 127.0.0.0/8 acl SSL_ports port 443 acl SSL_ports port 10000 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl Safe_ports port 10000 #webmin 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 CONNECT method CONNECT http_access allow manager localhost http_access deny manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access allow localhost htcp_access deny all hierarchy_stoplist cgi-bin ? cache_mem 500 MB maximum_object_size_in_memory 256 MB cache_dir ufs /home/cache 39999 16 256 store_dir_select_algorithm least-load access_log /var/log/squid3/access.log squid cache_log /var/log/squid3/cache.log cache_store_log /var/log/squid3/store.log refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern . 0 20% 4320 refresh_pattern -i \.exe$ 0 50% 99999 reload-into-ims override-lastmod ignore-no-store ignore-no-cache refresh_pattern \.ram$ 99999 50% 99999 ignore-reload ignore-no-store ignore-no-cache refresh_pattern ^http: 99999 50% 99999 override-expire ignore-reload ignore-no-store refresh_pattern \.html$ 99999 50% 99999 ignore-no-cache ignore-reload ignore-no-store refresh_pattern \.jpg$ 99999 50% 99999 ignore-no-cache refresh-ims ignore-reload refresh_pattern \.png$ 99999 50% 99999 ignore-no-cache refresh-ims ignore-reload refresh_pattern \.gif$ 99999 50% 99999 ignore-reload ignore-no-cache refresh_pattern \.swf$ 99999 50% 99999 reload-into-ims ignore-no-cache refresh-ims refresh_pattern ^http://b.static.ak.fbcdn.net/images/...r_logo_big.gif 99999 50% 99999 ignore-reload ignore-no-cache ignore-no-store refresh_pattern ^http://www.6arab.com 999999 50% 99999 ignore-reload ignore-no-cache acl facebook url_regex http://b.static.ak.fbcdn.net/images/...r_logo_big.gif http://www.facebook.com/images/ui/UI...tton_Green.png http://www.facebook.com/images/ui/UILinkButton_Blue.png http://www.facebook.com/images/welco...e_page_map.png http://b.static.ak.fbcdn.net/images/...e_5005_ltr.png http://b.static.ak.fbcdn.net/ http://www.facebook.com http://www.6arab.com no_cache allow facebook acl facebook2 dstdomain facebook.com saidacity.net 6arab.com no_cache allow facebook2 dns_nameservers 192.168.222.1 195.112.195.34 192.168.0.1 192.168.0.2 hosts_file /etc/hosts coredump_dir /var/spool/squid3 http_port 3128 cache_mgr h4ckXx@hotmail.com visible_hostname kad.lan dns_nameservers 192.168.222.1 195.112.195.34 acl my_network src 192.168.0.0/24 acl bad_sites url_regex -i "/etc/squid3/bad_sites" deny_info http://www.google.com.lb bad_sites http_access deny bad_sites acl bad_domain dstdom_regex -i "/etc/squid3/bad_domain" http_access deny bad_domain acl bad_extensions urlpath_regex "/etc/squid3/bad_extensions" http_access deny bad_extensions acl windowsupdate dstdomain windowsupdate.microsoft.com acl windowsupdate dstdomain .update.microsoft.com acl windowsupdate dstdomain download.windowsupdate.com acl windowsupdate dstdomain redir.metaservices.microsoft.com acl windowsupdate dstdomain images.metaservices.microsoft.com acl windowsupdate dstdomain c.microsoft.com acl windowsupdate dstdomain www.download.windowsupdate.com acl windowsupdate dstdomain wustat.windows.com acl windowsupdate dstdomain crl.microsoft.com acl windowsupdate dstdomain sls.microsoft.com acl windowsupdate dstdomain productactivation.one.microsoft.com acl windowsupdate dstdomain ntservicepack.microsoft.com http_access deny windowsupdate acl hotmail dstdomain .hotmail.com always_direct allow hotmail acl bad_time time 07:00-23:00 acl bad_site_domain dstdomain .youtube.com delay_pools 1 delay_class 1 2 delay_parameters 1 10250/10250 1500000/1500000 delay_access 1 allow bad_time http_access deny bad_time bad_site_domain acl cache_download url_regex "/etc/squid3/cache_download no_cache deny cache_download http_access allow my_network http_access deny all ////////// Thanks alot =) |
there you go! your confs are just splattered around. Put all your acls together, then your http_access lines together. It will be a good i dea to follow headlines like global configs, acl configs, cache_perfomance tuning, logging etc. and group your configs accordinmg to this.
You will note that squid.conf obeys ORDER, so the order in which your configs are layed out matters, and have greater impact on the behaviour of your proxy server. For example, your own refresh_pattern configs should come first before the defaults. You have not commented on ignore-no-store and imho, you dont need to use it. you config file is not sane, so you cant expect advanced settings to work when basic settings are not done properly. I think you would do better by understanding squid structure first before attempting to fiddle with cache settings. trial and error will only leave you frustrated. Read: http://www.squid-cache.org/Doc/config/refresh_pattern/ |
hey thx alot
do u know any site where i can get a vedio can teach me everything regard squid? Thanks alot =) |
All times are GMT -5. The time now is 03:40 PM. |