.htpasswd’ing rTorrent WEBUI ruTorrent

Since Chogie.info has been offline for quite some time, we thought what a terrible waste it would be for the Internet to lose those excellent rTorrent/ruTorrent tutorials. So, we kept them alive! Here’s Part 2:

Source from - http://chogie.info/?paged=14

Originally titled - “.htpasswd’ing rTorrent WEBUI ruTorrent”

====================================================

If you’ve followed the last guide on setting up rtorrent/rutorrent, then this part is also going to be a walk in the park. Same has before code to copy and paste is coloured lime, and text to enter into files is red.

# First off we need to edit the apache site configuration file.

sudo nano /etc/apache2/sites-enabled/000-default

# only thing we need to change is AllowOverride None to AllowOverride ALL under where it says, <directory /var/www/> so it looks something like this:

# Thats the messy part over, now to restart the webserver for the new changes to take place.

sudo /etc/init.d/apache2 restart

# Okay now that’s all that done, we need to make to files, one to contain the username and password for the webserver to use to allow you access, and the configuration file to tell the webserver what it wants from you, and where to locate the password file.

#Anywhere on you harddisk you can put the password file, I personally use /home/userX/ so i’m going to assume you doing the same from here on out. (userX being my home directory)

# Use this link to create the md5 of the username:password

http://www.htaccesstools.com/htpasswd-generator/

# Copy the output to you cilpboard, and to create the .htpasswd file

sudo nano /home/userX/.htpasswd

# The actual file doesn’t have a name, it’s just an extension, copy the output from the above link into the file, save and exit.

# Now we need to create one more file, in /var/www/rtorrent to tell the webserver what to do, when someone trys to access your webui.

sudo nano /var/www/rtorrent/.htaccess

# In this file your going to put this into it

AuthUserFile /home/userX/.htpasswd
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic

require user <username as it appears in the .htpasswd file>

# Save and exit, Thats it when you going to access your webui, you will be prompt for usename and password.