.htaccess lessons for me

I had to figure out some Apache stuff today, so that I could password protect a web directory for the new group weblog I’m working on with a few other collaborators (we’ll be covering marketing issues and the like) so I asked our sysadmin for some help, and read a few tutorials.

[note: I realize most of you won’t need to read these quick tutorials, but I might need them again someday, so I’m ‘blogmarking’ them (sort of like bookmarking, but always available to me, no matter where I am physically).]

· http://faq.clever.net/htaccess.htm
· http://www.javascriptkit.com/howto/htaccess.shtml
· http://apache-server.com/tutorials/ATusing-htaccess.html

Once I complete the first tutorial’s directions, it wasn’t working as I’d hoped (it’s never as easy as it seems). So Apokalytik helped me figure out that I needed to modify the “Directory” part of the httpd.conf file:

<Directory>
    AllowOverride None
    Options None
</Directory>

became:

<Directory>
    AllowOverride ALL
    Options ALL
</Directory>

Then I had to make a symlink for htpasswd in the /usr/bin directory, which Apokalytik showed me how to do.

After I added the .htaccess and .htpasswd file and restarted apache, all was good, and the directories are now protected.

I love Mac OS X because the built in terminal + airport let me do all of this from the comfort of my couch…

[updated: 10/5/2003] FYI, the htpasswd manual page from the Apache documentation is a useful page to have bookmarked, if you forget how to set a password.

1 Response to “.htaccess lessons for me”


Leave a Reply