httpd-wiki-changes mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Httpd Wiki] Update of "RewriteMisc" by RichBowen
Date Fri, 15 Jan 2010 14:35:46 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change notification.

The "RewriteMisc" page has been changed by RichBowen.


  RewriteRule ^/(.+\.php)$ balancer://myphpcluster/$1 [P] maxattempts=2
+ = Log executable file access =
+ We wish to create a log file that logs accesses to executable files, wherever they are in
the filesystem, and whatever file extension they have.
+ {{{
+ RewriteCond %{LA-U:REQUEST_FILENAME} -x
+ RewriteRule ^ - [E=exec:1]
+ CustomLog /var/logs/exec-cgi.log combined env=exec
+ }}}
+ == Discussion ==
+ The LA-U syntax does a look-ahead to find out what the value of a particular variable will
be later on. This requires a sub-request, and that results in something of a performance hit.
Consider using the ScriptLog directive instead. However, the technique used here can be used
for a larger class of problems, when a variable isn't available at request time, but will
be later on.
+ }}}

View raw message