httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sutton <p...@ukweb.com>
Subject Re: [2.0] proposed vhost config rewrite
Date Tue, 10 Jun 1997 09:54:22 GMT
On Mon, 9 Jun 1997, Ben Laurie wrote:
>   <Request (GET)|(POST)>
>    <URL /cgi-bin/(.*):path:>
>     Script /usr/www/scripts/$path
>    </URL>
>   </Request>

I would certainly agree with the idea that there needs to be a way of
conditionalising sections of the configuration file based on request-time
information. However I would prefer to use a single generic interface for
conditional section, rather than a new section for each type of
comparision. For example, instead of the above, use

<If REQUEST_METHOD ~ /(GET)|(POST)/>
 <If REQUEST_URI ~ /^\/cgi-bin\/(.*)/
  Script /usr/www/scripts/$1
 </If>
</If>

This could be expanded to <If> ... <Else> ... </If>, and would allow
almost any sort of conditionality. For example, the every-popular request
to not log local accesses:

<If REMOTE_IP ~ /^192.168./>       # My local network
 <If REMOTE_IP !~ /^192.168.1./>   # Delegated to a customer
  SetEnv islocal 1
 </If>
</If>

<If $islocal !~ /1/>
 TransferLog logs/access_log
</If>

//pcs



Mime
View raw message