You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Philip Naylor CSM Staff <Ph...@uwe.ac.uk> on 2002/06/05 18:12:32 UTC

Problem with external rewrite prog getting out of sync

	I'm trying to use Apache 1.3.24 as an inbound proxy for a pair of
back-end web servers, using mod_rewrite to pass staff pages onto one machine
and student pages onto the other.  This needs to behave slightly differently 
depending on whether the request is coming from inside the University (all
pages as accessible), or outside (only staff and specified student pages are
accessible).  The rewrites are done using a couple of external programs that
are short Bourne shell scripts which look up the user names in the 
passwd.byname NIS map.

	The configuration works OK up to a point, but after a while (sometimes 
a very short while) external users start getting responses to other people's
requests - e.g. :

from access.log on front-end server :

194.82.103.78 - - [05/Jun/2002:16:13:51 +0100] "GET /~jsa/ HTTP/1.0" 200 258560 
"-" "-" 194.82.103.78.149431023290028873

from the log file created by the rewrite program :

Wednesday June  5 16:13:48 BST 2002     /~jsa/  jsa     staff   
http://web03.cems.uwe.ac.uk/~jsa/

from rewrite.log on the front-end server:


194.82.103.78 - - [05/Jun/2002:16:13:48 +0100] [www.cems.uwe.ac.uk/sid#95070][ri
d#129db0/initial] (2) init rewrite engine with requested uri /~jsa/
194.82.103.78 - - [05/Jun/2002:16:13:48 +0100] [www.cems.uwe.ac.uk/sid#95070][ri
d#129db0/initial] (3) applying pattern '^/(~[^/]+)$' to uri '/~jsa/'
194.82.103.78 - - [05/Jun/2002:16:13:48 +0100] [www.cems.uwe.ac.uk/sid#95070][ri
d#129db0/initial] (3) applying pattern '^/~.*' to uri '/~jsa/'
194.82.103.78 - - [05/Jun/2002:16:13:48 +0100] [www.cems.uwe.ac.uk/sid#95070][ri
d#129db0/initial] (2) rewrite /~jsa/ -> http://web03.cems.uwe.ac.uk/~brbroggi/a3
quant.doc
194.82.103.78 - - [05/Jun/2002:16:13:48 +0100] [www.cems.uwe.ac.uk/sid#95070][ri
d#129db0/initial] (2) forcing proxy-throughput with http://web03.cems.uwe.ac.uk/
~brbroggi/a3quant.doc
194.82.103.78 - - [05/Jun/2002:16:13:48 +0100] [www.cems.uwe.ac.uk/sid#95070][ri
d#129db0/initial] (1) go-ahead with proxy request proxy:http://web03.cems.uwe.ac
.uk/~brbroggi/a3quant.doc [OK]


and from the access.log on the back-end server :


164.11.9.1 - - [05/Jun/2002:16:13:49 +0100] "GET /%7Ebrbroggi/a3quant.doc 
HTTP/1.1" 200 258560 "-" "-" 164.11.9.1.109591023290028398

The output from the rewrite prog is what would have been expected for the
request four prior to the current one.  Since the rewrite program is logging
the correct output, presumably this results from some sort of locking problem.
I've had the RewriteLock file on both UFS and TMPFS (this is on Solaris 8), but
it makes no difference - it just sits there as an empty file, with a time stamp
of when the server was last started.

Any pointers gratefully received (currently all external requests are being
routed to the staff only server, so requests for student pages are coming up
"not found", which isn't ideal, but at least the people can get hold of 
revision notes on the staff home pages).

Dr Philip J. Naylor AFRSPSoc,                  Philip.Naylor@uwe.ac.uk
Unix Systems Manager,                          Tel: +44/0 117 344 3348
Faculty of Computing, Engineering, and         Fax: +44/0 117 344 3155 
Mathematical Sciences, UWE, Bristol.           http://www.cems.uwe.ac.uk/

Disclaimer: No part of this e-mail should be construed as representing a 
plot to overthrow the government of the United States of America, or
assassinate its President.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Problem with external rewrite prog getting out of sync

Posted by Bruno Wolff III <br...@wolff.to>.
I have seen the same problem using 2.0.36 and 2.0.37 snapshots.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org