Article delegate-en/4252 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Reverse Proxy question
04 Dec 2008 01:19:59 GMT (Yutaka Sato)
The DeleGate Project


I noticed that you need an extra MOUNT option to reject by a URL pattern
in a "reverse proxy".

In message <_A4243@delegate-en.ML_> on 11/30/08(03:28:26) I wrote:
 | |One last question, I can't seem to find any way in the documentation to
 | |filter specific URLs.
 | |
 | |The problem is, some users are requesting a high bandwidth URL and I need to
 | |filter it. For example, assume that I know the format of a URL to load video
 | |files. I just want users to be able to load the text page with no
 | |multimedia. So an example would be something like: FILTER_URL=*video.avi* or
 | |FILTER=*media.php*. I hope this makes sense..
 | |
 | |So in summary, that would be to reject or deny certain URLs but "permit all"
 | |on the rest i.e. selective exclusion/rejection based on URL pattern
 | |matching.
 |It can be done by MOUNTing them with the "forbidden" option as this:
 |  MOUNT="*%Svideo.avi = forbidden"
 |  MOUNT="*%Smedia.php%S = forbidden"

In message <_A4244@delegate-en.ML_> on 11/30/08(03:45:02) I wrote:
 |And you can customize the error message (about this URL) to be sent
 |to clients as this:
 |  MOUNT="vURL rURL rcode=401"
 |for example:
 |  MOUNT="*%Svideo.avi /tmp/forbidden.html rcode=401"

If there is another MOUNT to be matched prior to these, these MOUNT
to filter URLs by URL path patterns will not be used.
In a "reverse proxy", there should be another MOUNT to match of course.
You can check the list of MOUNT sorted by (explicit/implicit) priorities
in the LOGFILE as this:

  MOUNT="*%Svideo.avi = forbidden"
  MOUNT="/* http://sv/* nvhost=www"

  12/04 10:11:24.17 [23409] 0+0: MOUNT[0]X[4] /-/builtin/icons/* = default
  12/04 10:11:24.17 [23409] 0+0: MOUNT[5]X[2] /* http://sv/* nvhost=www
  12/04 10:11:24.18 [23409] 0+0: MOUNT[6]X[3] *%Svideo.avi = forbidden

In this example, the MOUNT for http://sv/* always matches and the MOUNT to
reject "video.avi" is never used.
So you need to change the priority of MOUNTs by "pri" option as follows:

  MOUNT="*%Svideo.avi = forbidden,pri=1"
  MOUNT="/* http://sv/* nvhost=www"

  12/04 10:16:43.44 [23475] 0+0: MOUNT[0]X[3] *%Svideo.avi = forbidden,pri=1
  12/04 10:16:43.44 [23475] 0+0: MOUNT[1]X[4] /-/builtin/icons/* = default
  12/04 10:16:43.45 [23475] 0+0: MOUNT[6]X[2] /* http://li/* nvhost=x

  9 9   Yutaka Sato <>
 ( ~ )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]