[squid-users] How to allow certain media types from one domain?

From: Nick Duda <[email protected]>
Date: Wed, 29 Mar 2006 09:48:40 -0500

I'm a bit confused on the syntax I need in the squid.conf. I've tried
many things.

I have an ACL/http_access rule to deny downloading and streaming of any
MP3 files. I want to allow it from one website. I've tried basically
dstdomain allowing for that domain, but the other http_access rule is
taking over.

So I want to deny MP3 from everything except from domain
www.testdomain.com

Here is what I have in place:

-----------------------------------------------------------

acl testdomain dstdomain "/usr/local/squid/db/test" #in test is one line
that has .testdomain.com
acl filedownloads urlpath_regex -i \.exe$ \.mp3$ \.mov$ \.mpg$ \.mp?$
\.avi$ \.rm$
acl wmp browser -i ^.*Windows-Media-Player.*
acl wmp browser -i ^.*NSPlayer.*
acl wmp browser -i ^.*player.*
acl umv rep_mime_type ^video/* ^audio/*

http_access allow testdomain

http_access deny filedownloads

http_access deny wmp
http_reply_access deny umv

-----------------------------------------------------------

When I go to www.testdomain.com/blah/moreblah/blah.mp3 I get the access
denied error. I really don't think this is going to work as the
dstdomain is just allowing access to .testdomain.com but still
restricting the MP3 part. How can I setup a urlpath_regex to allow MP3
download for one domain. The URL will always change to the path of the
MP3 however the domain will remain the same.

Thanks,
Nick

---------------------
Confidentiality note
The information in this email and any attachment may contain confidential and proprietary information of
VistaPrint and/or its affiliates and may be privileged or otherwise protected from disclosure. If you are
not the intended recipient, you are hereby notified that any review, reliance or distribution by others
or forwarding without express permission is strictly prohibited and may cause liability. In case you have
received this message due to an error in transmission, please notify the sender immediately and to delete
this email and any attachment from your system.
---------------------
Received on Wed Mar 29 2006 - 07:48:26 MST

This archive was generated by hypermail pre-2.1.9 : Sat Apr 01 2006 - 12:00:04 MST