Linux Help

Setting up a password protected Apache2 Folder

1. Insert the following into the Apache2 configuration file (/etc/apache2/apache2.conf):
<Directory /var/www/protecteddirectory>
AllowOverride All
</Directory>

2. Create an htpasswd file in a common directory (not within the protected directory):
htpasswd -c /etc/apache2/htpasswd $username

3. Create an .htaccess file, under the protected directory:
vi /var/www/protecteddirectory/.htaccess

4. Populate the file, with the following:
AuthUserFile /etc/apache2/htpasswd
AuthType Basic
AuthName "Access only granted to special people"
Require user $username

5. Restart Apache2:
/etc/init.d/apache2 restart


Password Protected Encryption and Decryption
Encryption:
openssl enc -aes-256-cbc -salt -in raw.tar.gz -out encrypted.raw.tar.gz 
Decryption:
openssl enc -d -aes-256-cbc -in encrypted.raw.tar.gz -out raw.tar.gz

Ripping DVD from the Command-Line
Low Quality:
mencoder DVD://$videoseqnumber -vf pullup,softskip,hqdn3d=2:1:2,kerndeint -ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:vbitrate=600:vhq:vpass=1:autoaspect:acodec=libmp3lame -oac mp3lame -lameopts cbr:br=128 -o $outputfile.avi
Normal Quality:
mencoder DVD://$videoseqnumber -vf pullup,softskip,hqdn3d=2:1:2,kerndeint -ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:vbitrate=1200:vhq:vpass=1:autoaspect:acodec=libmp3lame -oac mp3lame -lameopts cbr:br=256 -o $outputfile.avi
High Quality:
mencoder DVD://$videoseqnumber -vf pullup,softskip,hqdn3d=2:1:2,kerndeint -ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:vbitrate=2400:vhq:vpass=1:autoaspect:acodec=libmp3lame -oac mp3lame -lameopts cbr:br=256 -o $outputfile.avi