|
|
|
|
How do I configure a web server for .torrent files?
You must associate files ending in .torrent with the Content-Type application/x-bittorrent.
For Apache, you should add the line:
AddType application/x-bittorrent .torrent to your httpd.conf configuration file. If you cannot modify the main httpd.conf file (such as in the case of a shared or virtual hosting scenario), you can also put the above AddType directive in a .htaccess file. This presumes that the server's administrator has enabled this ability with the AllowOverride FileInfo directive. Also note that settings in a .htaccess file only apply to the directory containing the file, so make sure this is the directory that will contain the .torrent files.
Alternatively, you can add the line:
application/x-bittorrent .torrent to your mime.types file, which is used if the TypesConfig directive is present in httpd.conf.
To add MIME types with Microsoft's IIS web server:
- Right-click the Web site and choose Properties.
- Select the HTTP Headers tab.
- In the MIME Map box, click File Types, and then click New Type.
- Enter the extension ".torrent" and the MIME type "application/x-bittorrent" in the appropriate boxes.
- Select OK to close all the dialogs.
If you cannot configure the application/x-bittorrent type, you could place the .torrent files in an archive (.zip, .rar, etc.) and serve that instead. Doing so will forfeit the ability to click on a torrent link and automatically launch the BitTorrent client, however. The user must manually unpack the .torrent file and then launch it to start the transfer.
|
|
|