[TriLUG] Apache Authentication

Jeff Baldwin baldwinj at email.unc.edu
Mon Sep 22 20:32:13 EDT 2003


Hello All --

I'm trying to setup a basic little authentication mechanism for my web
site using Apache.. but I'm running into a little problem.. like my login
doesn't work :-), that's some authentication mechanism!

Here's what I've done:

First of all I ran htpasswd in my /etc/httpd/conf directory:
htpasswd -c hteam soccer
<prompted for and set password>

Then I added the following within my virtualhost directive:
<VirtualHost 123.456.789.0:80>
    ServerAdmin root at www.domain.com
    DocumentRoot /www/server/html/
    ServerName www.domain.com
    Alias /icons/ "/www/server/icons/"
        <directory /www/server/html/team>
        AuthType Basic
        AuthName "Team - Private Area"
        AuthUserFile /etc/httpd/conf/hteam
        AuthAuthoritative on
        Require valid-user
        </directory>
</VirtualHost>

Now I restart Apache:
All goes well!

When I try to access anything in the /www/server/html/team directory via
the web, I am prompted for a username/password, but THEY DON'T WORK!

Any ideas?

Jeff




More information about the TriLUG mailing list