Squid proxy won't cache anything (tcp_tunnel)












0















Squid on 18.04 server won't cache anything and the majority is tcp_tunnel/200 when I tail the access log and the cache log shows that nothing is cached. How can I get it to cache websites?



Squid Config:



http_port 3128  
refresh_pattern ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|?) 0 0% 0
refresh_pattern . 0 20% 4320
acl localnet src 192.168.0.0/24
acl localhost src 127.0.0.1
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
acl url dstdomain "/etc/squid/url"
acl key url_regex -i "/etc/squid/key"
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access deny url
http_access deny key
cache_mem 1024 MB
maximum_object_size_in_memory 100 MB
cache_replacement_policy heap GDSF
cache_dir ufs /etc/squid/cache 5120 16 256
maximum_object_size 100 MB
cache_swap_low 85
cache_swap_high 90
access_log /var/log/squid/access.log
half_closed_clients off
hosts_file /etc/hosts
memory_pools off
client_db off
coredump_dir /var/spool/squid









share|improve this question




















  • 1





    It may be helpful to post relevant parts of the squid configuration you have already. Maybe try this: sed 's/#.*//;s/^s*$//;/^$/d' /etc/squid/squid.conf to make the output easier to parse.

    – isaaclw
    Jan 8 at 17:16











  • @isaaclw I've added the config to the question

    – Manzy
    Jan 8 at 22:27











  • I assume you intend to have squid cache in /etc/squid/cache. Usually /var/cache/ or /var/spool/ is the recommended cache directory. Regardless, could you check to see if the approprate file structure is there? Even if it is, you may need to run some kind of 'squid cache initialization' Regardless, you probably want to turn on # cache_log /var/log/squid/cache.log and tail it while you restart. The logging is a bit counter-intuitive, since the 'cache' log is where squid errors go, and 'access' log is the "usual operations" log, ie: where requests go in and out.

    – isaaclw
    15 hours ago











  • After you tail /var/log/squid/cache.log if you see any errors that you don't understand you can add them to this post.

    – isaaclw
    15 hours ago


















0















Squid on 18.04 server won't cache anything and the majority is tcp_tunnel/200 when I tail the access log and the cache log shows that nothing is cached. How can I get it to cache websites?



Squid Config:



http_port 3128  
refresh_pattern ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|?) 0 0% 0
refresh_pattern . 0 20% 4320
acl localnet src 192.168.0.0/24
acl localhost src 127.0.0.1
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
acl url dstdomain "/etc/squid/url"
acl key url_regex -i "/etc/squid/key"
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access deny url
http_access deny key
cache_mem 1024 MB
maximum_object_size_in_memory 100 MB
cache_replacement_policy heap GDSF
cache_dir ufs /etc/squid/cache 5120 16 256
maximum_object_size 100 MB
cache_swap_low 85
cache_swap_high 90
access_log /var/log/squid/access.log
half_closed_clients off
hosts_file /etc/hosts
memory_pools off
client_db off
coredump_dir /var/spool/squid









share|improve this question




















  • 1





    It may be helpful to post relevant parts of the squid configuration you have already. Maybe try this: sed 's/#.*//;s/^s*$//;/^$/d' /etc/squid/squid.conf to make the output easier to parse.

    – isaaclw
    Jan 8 at 17:16











  • @isaaclw I've added the config to the question

    – Manzy
    Jan 8 at 22:27











  • I assume you intend to have squid cache in /etc/squid/cache. Usually /var/cache/ or /var/spool/ is the recommended cache directory. Regardless, could you check to see if the approprate file structure is there? Even if it is, you may need to run some kind of 'squid cache initialization' Regardless, you probably want to turn on # cache_log /var/log/squid/cache.log and tail it while you restart. The logging is a bit counter-intuitive, since the 'cache' log is where squid errors go, and 'access' log is the "usual operations" log, ie: where requests go in and out.

    – isaaclw
    15 hours ago











  • After you tail /var/log/squid/cache.log if you see any errors that you don't understand you can add them to this post.

    – isaaclw
    15 hours ago
















0












0








0








Squid on 18.04 server won't cache anything and the majority is tcp_tunnel/200 when I tail the access log and the cache log shows that nothing is cached. How can I get it to cache websites?



Squid Config:



http_port 3128  
refresh_pattern ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|?) 0 0% 0
refresh_pattern . 0 20% 4320
acl localnet src 192.168.0.0/24
acl localhost src 127.0.0.1
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
acl url dstdomain "/etc/squid/url"
acl key url_regex -i "/etc/squid/key"
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access deny url
http_access deny key
cache_mem 1024 MB
maximum_object_size_in_memory 100 MB
cache_replacement_policy heap GDSF
cache_dir ufs /etc/squid/cache 5120 16 256
maximum_object_size 100 MB
cache_swap_low 85
cache_swap_high 90
access_log /var/log/squid/access.log
half_closed_clients off
hosts_file /etc/hosts
memory_pools off
client_db off
coredump_dir /var/spool/squid









share|improve this question
















Squid on 18.04 server won't cache anything and the majority is tcp_tunnel/200 when I tail the access log and the cache log shows that nothing is cached. How can I get it to cache websites?



Squid Config:



http_port 3128  
refresh_pattern ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|?) 0 0% 0
refresh_pattern . 0 20% 4320
acl localnet src 192.168.0.0/24
acl localhost src 127.0.0.1
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
acl url dstdomain "/etc/squid/url"
acl key url_regex -i "/etc/squid/key"
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access deny url
http_access deny key
cache_mem 1024 MB
maximum_object_size_in_memory 100 MB
cache_replacement_policy heap GDSF
cache_dir ufs /etc/squid/cache 5120 16 256
maximum_object_size 100 MB
cache_swap_low 85
cache_swap_high 90
access_log /var/log/squid/access.log
half_closed_clients off
hosts_file /etc/hosts
memory_pools off
client_db off
coredump_dir /var/spool/squid






18.04 proxy squid






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 9 hours ago









isaaclw

670516




670516










asked Jan 8 at 12:03









ManzyManzy

11




11








  • 1





    It may be helpful to post relevant parts of the squid configuration you have already. Maybe try this: sed 's/#.*//;s/^s*$//;/^$/d' /etc/squid/squid.conf to make the output easier to parse.

    – isaaclw
    Jan 8 at 17:16











  • @isaaclw I've added the config to the question

    – Manzy
    Jan 8 at 22:27











  • I assume you intend to have squid cache in /etc/squid/cache. Usually /var/cache/ or /var/spool/ is the recommended cache directory. Regardless, could you check to see if the approprate file structure is there? Even if it is, you may need to run some kind of 'squid cache initialization' Regardless, you probably want to turn on # cache_log /var/log/squid/cache.log and tail it while you restart. The logging is a bit counter-intuitive, since the 'cache' log is where squid errors go, and 'access' log is the "usual operations" log, ie: where requests go in and out.

    – isaaclw
    15 hours ago











  • After you tail /var/log/squid/cache.log if you see any errors that you don't understand you can add them to this post.

    – isaaclw
    15 hours ago
















  • 1





    It may be helpful to post relevant parts of the squid configuration you have already. Maybe try this: sed 's/#.*//;s/^s*$//;/^$/d' /etc/squid/squid.conf to make the output easier to parse.

    – isaaclw
    Jan 8 at 17:16











  • @isaaclw I've added the config to the question

    – Manzy
    Jan 8 at 22:27











  • I assume you intend to have squid cache in /etc/squid/cache. Usually /var/cache/ or /var/spool/ is the recommended cache directory. Regardless, could you check to see if the approprate file structure is there? Even if it is, you may need to run some kind of 'squid cache initialization' Regardless, you probably want to turn on # cache_log /var/log/squid/cache.log and tail it while you restart. The logging is a bit counter-intuitive, since the 'cache' log is where squid errors go, and 'access' log is the "usual operations" log, ie: where requests go in and out.

    – isaaclw
    15 hours ago











  • After you tail /var/log/squid/cache.log if you see any errors that you don't understand you can add them to this post.

    – isaaclw
    15 hours ago










1




1





It may be helpful to post relevant parts of the squid configuration you have already. Maybe try this: sed 's/#.*//;s/^s*$//;/^$/d' /etc/squid/squid.conf to make the output easier to parse.

– isaaclw
Jan 8 at 17:16





It may be helpful to post relevant parts of the squid configuration you have already. Maybe try this: sed 's/#.*//;s/^s*$//;/^$/d' /etc/squid/squid.conf to make the output easier to parse.

– isaaclw
Jan 8 at 17:16













@isaaclw I've added the config to the question

– Manzy
Jan 8 at 22:27





@isaaclw I've added the config to the question

– Manzy
Jan 8 at 22:27













I assume you intend to have squid cache in /etc/squid/cache. Usually /var/cache/ or /var/spool/ is the recommended cache directory. Regardless, could you check to see if the approprate file structure is there? Even if it is, you may need to run some kind of 'squid cache initialization' Regardless, you probably want to turn on # cache_log /var/log/squid/cache.log and tail it while you restart. The logging is a bit counter-intuitive, since the 'cache' log is where squid errors go, and 'access' log is the "usual operations" log, ie: where requests go in and out.

– isaaclw
15 hours ago





I assume you intend to have squid cache in /etc/squid/cache. Usually /var/cache/ or /var/spool/ is the recommended cache directory. Regardless, could you check to see if the approprate file structure is there? Even if it is, you may need to run some kind of 'squid cache initialization' Regardless, you probably want to turn on # cache_log /var/log/squid/cache.log and tail it while you restart. The logging is a bit counter-intuitive, since the 'cache' log is where squid errors go, and 'access' log is the "usual operations" log, ie: where requests go in and out.

– isaaclw
15 hours ago













After you tail /var/log/squid/cache.log if you see any errors that you don't understand you can add them to this post.

– isaaclw
15 hours ago







After you tail /var/log/squid/cache.log if you see any errors that you don't understand you can add them to this post.

– isaaclw
15 hours ago












0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1107963%2fsquid-proxy-wont-cache-anything-tcp-tunnel%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1107963%2fsquid-proxy-wont-cache-anything-tcp-tunnel%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

GameSpot

connect to host localhost port 22: Connection refused

Getting a Wifi WPA2 wifi connection