Created
March 12, 2012 08:07
-
-
Save oranie/2020651 to your computer and use it in GitHub Desktop.
conf_app.psgi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $app = sub { | |
my $env = shift; | |
my $body = <<"EOF"; | |
<source> | |
type tail | |
format \/^(?<XFF-host>[^ ]*) (?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<status>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)" (?<response_time>[^ ]*))?$\/ | |
time_format %d/%b/%Y:%H:%M:%S %z | |
path /var/log/httpd/access_log_sym | |
tag apache.access.$env->{REMOTE_ADDR} | |
pos_file /var/tmp/access.log.pos | |
</source> | |
EOF | |
return [ | |
200, | |
[ "Content-Type", "text/plain" ], | |
[ "$body" ], | |
]; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment