Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-release > by-pkgid > dccc315cd5d3495e8d0a4540449ec84d > files > 14

apache-mod_bt-0.0.19-17mdv2010.1.x86_64.rpm

# Example configuration file for mod_bt

# Always be sure to load mod_bt before PHP when using php_mod_bt
# LoadModule bt_module          modules/mod_bt.so
# LoadModule php4_module        modules/libphp4.so

<IfModule mod_bt.c>

# Without the "Tracker On" directive, loading mod_bt does nothing.
    Tracker             On

# Set this to a directory that your apache server can write to, that you wish mod_bt
# to use to store it's data.
    TrackerHome         /var/lib/mod_bt

# This the most permissive TrackerFlags setting possible
    TrackerFlags        AllowScrapeFull AllowScrapeVerbose AllowScrapeXML AllowScrapeGeneral -RequireReg

# TrackerDetailURL determines where people go when they click on an infohash link on the generated root HTML page.
#  If TrackerDetailURL ends with a "/", the infohash's filename is appended to the URL
#  If TrackerDetailURL ends with a ".", the "." is replaced with the infohash's filename, followed by ".torrent"
#  If TrackerDetailURL ends with anything else, "?info_hash=", followed by the infohash string, is appended to the URL
#   (See the modbt-details handler below.)
    TrackerDetailURL    /details

# If you specify this, you can include HTML into the root html info page.
#       TrackerRootInclude      /motd.inc

# Set up the port we want to listen on
    Listen 6969
    NameVirtualHost *:6969

    <VirtualHost *:6969>

# ServerName is important if you're running other vhosts
        ServerName              trackers.virtualhost.name

# If you want to serve static files off of the tracker as well, put a DocumentRoot here to override the default vhost
#               DocumentRoot    /opt/apache2/htdocs

# HTML scrape handler on /
        <LocationMatch "^/$">
            SetHandler          modbt-root

# If you use TrackerRootInclude, you need SSI enabled.
            <IfModule mod_include.c>
                Options             +Includes
                SetOutputFilter     INCLUDES
            </IfModule>
        </LocationMatch>

# Tracker URL on /announce
        <Location "/announce">
            SetHandler          modbt-announce

# If we have mod_rewrite, there's some more fun we can have with shielding...
            <IfModule mod_rewrite.c>
                RewriteEngine   On

                # Enable this if you don't want people to be able to set shield mode themselves
                #RewriteCond                %{QUERY_STRING}     ^.*shield=1
                #RewriteRule                (.*)        -       [F]

                # Activate shield mode on IPs that are known to be stable seeds
                # ... unless they've activated it already
                RewriteCond             %{QUERY_STRING}     !^.*shield=1
                # A good IP
                RewriteCond             %{REMOTE_ADDR}  ^10.20.30.40    [OR]
                # Another good IP - make sure there's no [OR] on the last one
                RewriteCond             %{REMOTE_ADDR}  ^11.22.33.44
                # Append "sheild=1" to the URL arguments and call /announce
                RewriteRule             (.*)    /announce?shield=1      [PT,L,QSA,NE,NS]
            </IfModule>
        </Location>

# Scrape URL
        <Location "/scrape">
            SetHandler              modbt-scrape
        </Location>

# Register URL
        <Location "/register">
            SetHandler              modbt-register

# Set up some access credentials here if you want to restrict registration..
# AuthUserFile, IP-based Authorization, your own mod_perl authentication module, whatever
        </Location>

# Details URL
        <Location "/details">
            SetHandler          modbt-details
        </Location>
    </VirtualHost>
</IfModule>