Add password to Apache2 directory.

Put something like this in your sitename.conf:

<IfModule mod_ssl.c>
<VirtualHost *:443>
DocumentRoot "/mnt/music"

<Directory "/mnt/music">
  Allow from all
  AuthUserFile /var/www/
  AuthType Basic
  AuthName "muziek"
  Require valid-user

CustomLog "|/usr/bin/rotatelogs /var/www/ 86400" vhost_combined env=!dontlog
ErrorLog "|/usr/bin/rotatelogs /var/www/ 86400"



Use htpasswd -c /var/www/ $USERNAME to create the .wachtwoord file.

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.