August « 2006 « Matt’s Blog

Matt’s Blog Just another weblog


apache htaccess and htdigest

Okay, so this evening I noticed I had webalizer installed (http://localhost/usage) and was desperatly concerned when I noticed it was exposed to the entire world. Luckily enough, I was installing MythWeb a few days ago and stumbled upon htdigests for authentication. Apparently, it still (like basic authentication) has its problems which you may read about in the Apache manual. However, digest authentication only sends the MD5 of your password across the web. Therefore, intruders will not be able to intercept the contents of your password. Nonetheless, webalizer uses the directory /var/www/usage to store it's files and this happens to be the directory that I am trying to protect. My inital idea was to drop a .htaccess file inside of this directory and see what happens. Here were the contents of that file:

AuthType Digest AuthName "Webaliver" AuthDigestFile /var/www/htdigest Require valid-user

Very simple. The problem was, the directory did not have an "AllowOverride" tag inside my httpd.conf file. As a matter of fact, the file didn't even exist in the directory. No problem, lets create the element. Inside httpd.conf:

AuthType Digest AuthName "Webalizer" AuthDigestFile /var/www/htdigest Require valid-user

Another way of doing it... Instead of creating a htaccess file for the /usage directory, let's just add the authentication parameters inside of the directory element of the httpd.conf file.
Directory> AuthType Digest AuthName "Webalizer" AuthDigestFile /var/www/htdigest Require valid-user /Directory>

That should help. Bed time. Coming up next, how to make Amanda force full backups to your USB drive.

Filed under: Uncategorized 3 Comments

This blog thing…

Soon to come, my technical accomplishments in my own private blog. No more worrying about "Now, how did I do that?" I plan on logging the problems that I've solved, the methods, and use the blog as a sort-of bookmark dump.

I think it would also be a good idea to log things that I am trying to study. How about storing mind-maps on this thing? Now there is something to think about. I was reading somewhere, that there is a mindmap utility for the PC. I really need to get that.

Which reminds me, spend some time reading "The UNIX Operating System" by William Stalling 2005. Check knowlegdeTree for a reference. You may be wondering where I found this source. I have some links below:

Since I signed up with DynDNS to provide DNS for my static IP address, I want my web server to include SSL capabilities , to encrypt data which I move along the Internet super highway. This is just a reminder to look into this. I'll probably post about my experience in the near future.

Anyway, I'm out. Just wanted to jot down my plan of action for this blog.

Filed under: Uncategorized No Comments