Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I configure the squid to only request text/html to the parent cache; right now I am using : cache_peer 127.0.0.1 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 127.0.0.1 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 127.0.0.1 allow elhtml
cache_peer_access 127.0.0.1 deny all

and it does not works

Thanks in advance for the help.

share|improve this question

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

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

1 Answer 1

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 127.0.0.1 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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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