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

[DeleGate-En] Re: mount virtual host question
31 Mar 2001 09:08:15 GMT feedback@delegate.org (Yutaka Sato)


In message <_A1075@delegate-en.ML_> on 03/31/01(08:52:09)
you Songbo Li <pgmcabdyi-re5dixuhohtr.ml@ml.delegate.org> wrote:
 |MOUNT="/v1/* http://www.searchitv.com/*" \
 |MOUNT="/v2/* http://www.packetspy.com/*"
 |
 |2 rUrl are sharing the same ip address, if the pages contain links
 |to each other, I found all the links were rewriten to v1 (the first
 |mounted).
...
 |Is there any Mount options or URICONV setting can fix this?

At least from the viewpoint of symmetrical design with the MountOption
"host=-hostname" which is used to care virtual hostname of DeleGate itself,
virtual hostname of destination server should be cared like
"dst=-hostname".
In practice it works for selecting a MOUNT parameter from multiple MOUNTs
with equivalent rURLs in response rewriting like this:

  MOUNT="/v1/* http://www.searchitv.com/* dst=-www.searchitv.com" \
  MOUNT="/v2/* http://www.packetspy.com/* dst=-www.packetspy.com"

But unfortunately it disables matching in request rewriting in the
current implementation. The enclosed path will fix the problem.

# Also the bug can be escaped without the patch like this:
#  MOUNT="/v1/* http://www.searchitv.com/*" \
#  MOUNT="/v1/* http://www.searchitv.com/* dst=-www.searchitv.com" \
#  MOUNT="/v2/* http://www.packetspy.com/*" \
#  MOUNT="/v2/* http://www.packetspy.com/* dst=-www.packetspy.com"

Cheers,
Yutaka
--
Yutaka Sato <ysato@delegate.org> http://www.delegate.org/~ysato/   @ @ 
Computer Science Division, Electrotechnical Laboratory            ( - )
1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan                  _<   >_



*** ../../../delegate7.2.0/src/mount.c	Tue Feb 20 10:29:18 2001
--- mount.c	Sun Apr  1 06:00:06 2001
***************
*** 831,836 ****
--- 831,846 ----
  	int porti;
  	int got;
  
+ 	/* except for MOUNTs which extract destination server information
+ 	 * from vURL dynamically, the destination is in rURL statically.
+ 	 */
+ 	if( !mt->Dst.u_path2site && *srcurl == '/' ){
+ 		if( mt->Dst.u_hostn[0] )
+ 		if( matchPath1(mt->dstList,"-",mt->Dst.u_hostn,mt->Dst.u_iport))
+ 			return 0;
+ 		return 1;
+ 	}
+ 
  	if( mt->Dst.u_path2site ){
  		got = 0;
  		scan_URI_site(srcurl+strlen(mt->Src.u_src),site,sizeof(site));

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