You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wiki-changes@httpd.apache.org by Apache Wiki <wi...@apache.org> on 2010/01/15 15:35:46 UTC
[Httpd Wiki] Update of "RewriteMisc" by RichBowen
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.
http://wiki.apache.org/httpd/RewriteMisc?action=diff&rev1=2&rev2=3
--------------------------------------------------
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.
+
+ }}}
+