How do I configure the squid to only request text/html to the parent cache; right now I am using : cache_peer parent 8080 0 no-query no-digest

on the second hand I get a lot of direct request that do not use the parent proxy: some queries go like FIRST_UP_PARENT and some like DIRECT, how do I tell the squid to always use parent for text/html

BTW .. is a transparent proxy

I have tried :

cache_peer parent 8080 0 no-query no-digest
acl elhtml req_mime_type -i ^text/html$
acl elhtml req_mime_type -i text/html
cache_peer_access allow elhtml
cache_peer_access deny all

and it does not works

Thanks in advance for the help.

migrated from stackoverflow.com Mar 20 '10 at 20:16

This question came from our site for professional and enthusiast programmers.


Turns out you can't ealuate mime type responses before they go to a parent because the request is just being made; you don't have the mime type yet.

The best you can do is put a list of common extensions to avoid using the parent ..it ended up like this.

cache_peer parent 8080 0 no-query name=gobox
acl nopasa url_regex "/etc/squid3/nopasa.acl"
always_direct allow nopasa
never_direct deny nopasa

where the nopasa.acl is a list of common binary extensions such as swf, jpg, png, etc etc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.