Ignore:
Timestamp:
Sep 8, 2009, 12:54:55 AM (15 years ago)
Author:
quentin
Message:
Handle ~urls as well when gathering statistics
Location:
trunk/server/fedora/config/etc/httpd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/fedora/config/etc/httpd/conf/httpd.conf

    r1314 r1316  
    145145LogFormat "%V %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    146146LogFormat "%h %l %u %t \"%r\" %>s %b" common
    147 LogFormat "%a %V" statistics
     147LogFormat "%a %V %U" statistics
    148148#CustomLog /var/log/httpd/access_log combined
    149149CustomLog "|/etc/httpd/statistics_log_mitonly.sh" statistics
  • trunk/server/fedora/config/etc/httpd/statistics_log_mitonly.sh

    r1315 r1316  
    11#!/bin/sh
    2 awk '/^18\./ && ! /^18.181/ { print $2; fflush() }' >> /var/log/httpd/statistics_log
     2perl -ne 'BEGIN { $| = 1 }
     3next unless /^18\./;
     4next if /^18\.181\./;
     5chomp; split;
     6if ($_[1] eq "scripts.mit.edu" && $_[2] =~ m|/(~[^/]+)/|) {
     7print "$1\n";
     8} else {
     9print "$_[1]\n";
     10}' >> /var/log/httpd/statistics_log
     11#awk '/^18\./ && ! /^18.181/ { print $2; fflush() }' >> /var/log/httpd/statistics_log
Note: See TracChangeset for help on using the changeset viewer.