[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Savannah-hackers-public] mirror redirection
From: |
Alex Fernandez |
Subject: |
Re: [Savannah-hackers-public] mirror redirection |
Date: |
Sun, 29 Aug 2010 10:27:35 +0200 |
Indeed, I have been wanting to do something like this for ages! Thanks
a lot for finding the time to implement it (and it looks like a very
elegant solution too).
Alex.
On Fri, Aug 20, 2010 at 10:18 AM, Sylvain Beucler <address@hidden> wrote:
> This sounds great, thanks!
>
> Feel free to drop by address@hidden when you do the change, I should
> be around :)
>
> --
> Sylvain
>
> On Fri, Aug 20, 2010 at 09:10:35AM +0100, Brian Gough wrote:
>> Hi
>>
>> This is my proposed change to redirect download links for files only,
>> and serve directory listings locally (this was to avoid unwanted ads
>> in directory listings on mirror sites.) I plan to put it online at the
>> weekend.
>>
>> Brian Gough
>>
>>
>> *** /etc/apache2/sites-available/download Fri May 7 07:04:18 2010
>> --- /etc/apache2/sites-available/download.no_redirect_dirs Fri Aug 20
>> 07:54:59 2010
>> ***************
>> *** 68,74 ****
>> Alias /mirmon/icons/ "/usr/share/mirmon/icons/"
>> ScriptAlias /awstats.pl /var/www/download/awstats.pl
>>
>> ! <Location /releases>
>> SetHandler perl-script
>> PerlSetVar GeoIPDBFile "/usr/local/share/GeoIP/GeoIP.dat"
>> PerlSetVar GeoIPMirror "/usr/local/share/GeoIP/download.txt"
>> --- 68,81 ----
>> Alias /mirmon/icons/ "/usr/share/mirmon/icons/"
>> ScriptAlias /awstats.pl /var/www/download/awstats.pl
>>
>> ! # Send requests for files to the Apache2::Geo::Mirror redirector
>> ! RewriteEngine On
>> ! RewriteRule ^/releases/(.*[^/])$ /releases-redirect/$1 [NS,PT]
>> !
>> ! # Serve everything else locally (i.e. directory listings)
>> ! Alias /releases/ "/srv/download/"
>> !
>> ! <Location /releases-redirect>
>> SetHandler perl-script
>> PerlSetVar GeoIPDBFile "/usr/local/share/GeoIP/GeoIP.dat"
>> PerlSetVar GeoIPMirror "/usr/local/share/GeoIP/download.txt"
>
>