[mythtv-users] .htaccess

Andy Burns fedora at adslpipe.co.uk
Wed Apr 12 22:46:55 UTC 2006


Ben Edwards (lists) wrote:

> I have apache2 running on Ubuntu, can someone please point me to a step
> by step howto so I can password protect directory's using .htaccess.
> Also is this recursive (i.e. douse it protect all directorys under it or
> just the directory in question?

Don't fall into the trap of thinking .htaccess is "the" way of securing 
folders, it is just "a" way. You can do it within the httpd.conf 
instead, first create a password file by running

htpasswd -c /etc/httpd/mypasswdfile myusername

and enter the password, if you want to add additional users do so with

htpasswd mypasswdfile otherusername

set the directory options within your httpd.conf for the folder you want 
to protect, e.g

         <Directory "/var/www/html/mythweb">
                 Options all
                 AllowOverride All
                 AuthType Basic
                 AuthName "MyMythTvRealm"
                 AuthUserFile /etc/httpd/mypasswdfile
                 Require user myusername otherusername
         </Directory>

Your paths might vary from the above, I'm not familiar with where ubuntu 
  shoves stuff ...


More information about the mythtv-users mailing list