httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Tait <>
Subject Several questions with Apache 2.0.35 (mod_rewrite, mod_cache, mod_proxy) on Solaris 8
Date Fri, 19 Apr 2002 09:56:47 GMT
Hi all,

I'm currently working (under extreme time limitations) on building and 
configuring Apache 2.0.35 for a client.  There are a couple of requirements 
that are important to the project:

   - Some files will be cached, some won't
   - Some files need a call out to an external java program for 
authentication/authorisation, some don't.
   - There may be a requirement to retrieve (proxy) external content.
   - The webroot will be mounted from a SAN.

I've compiled Apache with mod_so, mod_proxy, mod_rewrite, mod_cache and 
mod_disk_cache and the worker MPM with the following command:

   ./configure --enable-so \
               --enable-modules="proxy rewrite cache disk_cache" \
               --enable-layout=Solaris \

The way we intend to handle this is to have four directories:


We intend to use mod_cache to cache the relevant documents on the local 
filesystem to avoid hitting the SAN every time.  We also intend to use 
mod_rewrite to run the java program for authorisation of files in 
directories ProtCache and ProtNoCache.

I'm using "gcc version 2.95.3 20010315 (release)" for the build.  The build 
goes OK, and I can install the resulting binaries.  I've edited the 
necessary sections in httpd.conf (as far as I can tell).  I have the 
following rewrite setup:

   RewriteMap  AUTH  "prg:/usr/j2se/bin/java -classpath 
/usr/src/client:/usr/src/client/lib/jlog.jar AUTH 500 /tmp/auth_log"
#  RewriteMap  AUTH  "prg:/usr/src/hutch3g/AUTH"
   RewriteRule ^/Prot([^/]*)/(.+) /${AUTH:Prot$1/$2|DENIED}
   RewriteRule ^/DENIED$ - [F]
   RewriteLog /var/apache/logs/rewrite_log
   RewriteLogLevel 3
   RewriteEngine on

However, the external rewriting program never seems to get executed.  No 
logfile is ever produced by the program and it never shows up in any 
process list.  I can run exactly the command line I am supply in httpd.conf 
as user apache and as root.  I have tried replacing this with a simple C 
program that takes no parameters, but it still never gets executed.  Am I 
doing something drastically wrong here (and if so, what? ;))?  I can supply 
source code for stubbed-out versions of both the Java program and the C 

For the caching configuration, I have the following:

   CacheEnable disk /ProtCache
   CacheEnable disk /NoProtCache
   CacheRoot /var/apache/cache
   CacheOn on

The directory /var/apache/cache does exist.  However, requesting 
/NoProtCache/index.html does not result in anything being written to the 
cache directory.  I've tried prefixing the directories above with the 
docroot path, but still no luck.  Again, am I missing something obvious 
(and if so, what? ;))?

Also, the following questions have been asked which I'm not sure of the 
answer to:

   1) In access_log, we have a "bytes sent" field.  If a download is 
discontinued (e.g. we lose the network connection halfway through a 
download), does this log the bytes sent up until disconnection, or the 
bytes that should have been sent?

   2) Assuming we can get our java external rewriting engine running, how 
many instances of this will be kicked off, at server startup and at request 
time?  The program is multithreaded.

Any help you can offer will be very gratefully received, as I'm already 
running over a day late.

Many thanks,


This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message