Hello,
make a file in the dir of the site you want passwd protected called 
.htaccess. In the file, it should look something like this:

AuthName "Web Log Reports"
AuthType Basic
AuthUserFile /usr/local/etc/apache/users

require valid-user

then make a file that will contain vaild-users such as:
touch /usr/local/etc/apache/ssl-users

At that point you need only to add passwords...

htpasswd -c /usr/local/etc/apache/ssl-users some-user
which will then ask your for the password for the new user   some-user.

When you want to add more users, type
htpasswd -b /usr/local/etc/apache/ssl-users name password

Of course substitute your own file names and paths. The one above, goes to an 
SSL enabled site. It doesn't matter if the site is or is not SSL. 

hope that helps.

Regards,
Lanny
On February  7, 2001 10:59 am, James Hastings-Trew wrote:
> on 2/7/01 2:56 AM, Owen Boyle at [EMAIL PROTECTED] wrote:
> > James Hastings-Trew wrote:
> >> I think others have asked this question as well, but I would like a
> >> portion of my secure site to be blocked to access unless a name and
> >> password is entered.
> >
> > There should be no problem with running password-access under SSL.
> > Double-check the following points:
> >
> > - Your configuration should look something like this (assuming you put
> > the authorisation directives in httpd.conf):
> >
> > <VirtualHost your_ssl_site:443>
> >
> > ...SSL directives...
> >
> > DocumentRoot      /home/web/html/secure
> >
> > <Directory /home/web/html/secure/protected>
> >   AuthType      Basic
> >   AuthName      "Protected HTTPS Area"
> >   AuthUserFile  /home/web/admin/https.pwd
> >   require       valid-user
> > </Directory>
> >
> > </VirtualHost>
> >
> > - make sure to *restart the server* after making the changes.
>
> Yes, you'd think this would work, but after trying configuring the server
> with the directives in the httpd.conf file and/or in an .htaccess file, the
> result is the same - apache blithely serves up the requested page without
> asking for a name and password.
>
> The directives in my httpd.conf look like this:
>
> <VirtualHost  111.222.333.444>
>
> ....SSL directives...
>
> <Directory /var/www/my.domain.com/html/adminpages>
>   AuthType Basic
>   AuthName "Website Admin"
>   AuthUserFile /etc/httpd/admin-users
>   require valid-user
> </Directory
>
>
> ______________________________________________________________________
> Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
> User Support Mailing List                      [EMAIL PROTECTED]
> Automated List Manager                            [EMAIL PROTECTED]

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Lanny Baron
FreeBSD Systems; Freedom Technologies Corp.
1.877.963.1900
http://www.FreeBSDsystems.COM
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to