commit
18652691b0
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
const REGEX_LINE = '/\S+ \S+ \S+ \[([^:]+:\d+:\d+:\d+ [^\]]+)\] "(\S+)(?: (\S+) \S+)?" (\S+) (\S+) "[^"]*" "[^"]*" .* size:(\S+) \S+(?: +"?(\S+-\S+-\S+-\S+-[^\s"]+|-)"? "?(dvd|ftp|-)"?)?/';
|
||||
const REGEX_LINE = '/\S+ \S+ \S+ \[([^:]+:\d+:\d+:\d+ [^\]]+)\] "(\S+)(?: (\S+) \S+)?" (\S+) (\S+) "[^"]*" "[^"]*" .* size:(\S+) \S+(?: +"?(\S+-\S+-\S+-\S+-[^\s"]+|-)"? "?(dvd|ftp|mini|usb-[^"]*|livecd-[^"]*|appliance-?[^"]*|-)"?)?/';
|
||||
const REGEX_PRODUCT = '#/(?:(tumbleweed)|distribution/(?:leap/)?(\d+\.\d+)|openSUSE(?:_|:/)(?:leap(?:_|:/))?(factory|tumbleweed|\d+\.\d+))#i';
|
||||
const REGEX_IMAGE = '#(?:/(?:iso|live)/[^/]+-(DVD|NET|GNOME-Live|KDE-Live|Rescue-CD|Kubic-DVD)-[^/]+\.iso(?:\.torrent)?|/jeos/[^/]+-(JeOS)\.[^/]+\.(?:qcow2|vhdx|vmdk|vmx)$)#';
|
||||
|
||||
|
36
metrics/access/sample_download_o_o.conf
Normal file
36
metrics/access/sample_download_o_o.conf
Normal file
@ -0,0 +1,36 @@
|
||||
<VirtualHost *:80>
|
||||
|
||||
# need to point /etc/hosts to your IP to fool zypper
|
||||
ServerName download.opensuse.org
|
||||
|
||||
DocumentRoot /srv/www/vhosts/download.opensuse.org
|
||||
|
||||
HostnameLookups Off
|
||||
|
||||
UseCanonicalName Off
|
||||
|
||||
CustomLog /var/log/download_access_log "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \
|
||||
want:%{WANT}e give:%{GIVE}e r:%{MB_REALM}e %{X-MirrorBrain-Mirror}o \
|
||||
%{MB_CONTINENT_CODE}e:%{MB_COUNTRY_CODE}e ASN:%{ASN}e P:%{PFX}e \
|
||||
%I %O size:%{MB_FILESIZE}e %{Range}i \
|
||||
\"%{X-ZYpp-AnonymousId}i\" \"%{X-ZYpp-DistributionFlavor}i\""
|
||||
|
||||
<Directory "/srv/www/vhosts/download.opensuse.org">
|
||||
|
||||
Options Indexes FollowSymLinks
|
||||
|
||||
AllowOverride None
|
||||
|
||||
<IfModule !mod_access_compat.c>
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule mod_access_compat.c>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</IfModule>
|
||||
|
||||
</Directory>
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
# vim: syntax=apache
|
Loading…
x
Reference in New Issue
Block a user