I think something like this should come in a README for rutorrent along with the .config file I've supplied
so after you've set it all up and sucessfully logged in you'll want to secure your rtorrent interface. I did this by using htdigest2 like it's done with mythweb. Pretty simple, you create a password file, then put the conf file in apache then restart apache.
First make the password file, you want to put it somewhere else other than in your webserver directory, like in /var/lib/apache2 or /etc/apache2/ or something
The first command with the -c will create the file, put it in a dir, give it a name, assign the realm, then give a username. After you hit enter it'll prompt you for a password. All of these can be changed as you like so long as you remember them for the .conf file after
Code:
htdigest2 -c /etc/apache2/rtorrent.password.digest rtorrent username
If you want other users to log in too you can add them to that same file with this:
Code:
htdigest2 /etc/apache2/rtorrent.password.digest rtorrent username
Second, go into the config folder for your distro, myne was /etc/apache2/conf.d/
Code:
vim rutorrent.conf
and paste the following code, then change the following lines as required:
AuthName "rtorrent"
AuthUserFile /etc/apache2/rtorrent.password.digest
Code:
<LocationMatch .*/pl/stream/[0-9]+/[0-9]+>
Allow from all
</LocationMatch>
<Directory "/srv/www/htdocs/rutorrent" >
AuthType Digest
AuthName "rtorrent"
AuthUserFile /etc/apache2/rtorrent.password.digest
Require valid-user
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
Order allow,deny
Satisfy any
</Directory>
Third and last: restart apache
Code:
/etc/init.d/apache2 restart
done.
If anyone can think of ways to improve this, or do it a completely different way but have it more secure please post!
so after you've set it all up and sucessfully logged in you'll want to secure your rtorrent interface. I did this by using htdigest2 like it's done with mythweb. Pretty simple, you create a password file, then put the conf file in apache then restart apache.
First make the password file, you want to put it somewhere else other than in your webserver directory, like in /var/lib/apache2 or /etc/apache2/ or something
The first command with the -c will create the file, put it in a dir, give it a name, assign the realm, then give a username. After you hit enter it'll prompt you for a password. All of these can be changed as you like so long as you remember them for the .conf file after
Code:
htdigest2 -c /etc/apache2/rtorrent.password.digest rtorrent username
If you want other users to log in too you can add them to that same file with this:
Code:
htdigest2 /etc/apache2/rtorrent.password.digest rtorrent username
Second, go into the config folder for your distro, myne was /etc/apache2/conf.d/
Code:
vim rutorrent.conf
and paste the following code, then change the following lines as required:
AuthName "rtorrent"
AuthUserFile /etc/apache2/rtorrent.password.digest
Code:
<LocationMatch .*/pl/stream/[0-9]+/[0-9]+>
Allow from all
</LocationMatch>
<Directory "/srv/www/htdocs/rutorrent" >
AuthType Digest
AuthName "rtorrent"
AuthUserFile /etc/apache2/rtorrent.password.digest
Require valid-user
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
Order allow,deny
Satisfy any
</Directory>
Third and last: restart apache
Code:
/etc/init.d/apache2 restart
done.
If anyone can think of ways to improve this, or do it a completely different way but have it more secure please post!