Forum Moderators: DixonJones

Message Too Old, No Replies

login authorization

is there a easy way?

         

ikbenhet1

11:29 pm on Dec 17, 2002 (gmt 0)

10+ Year Member




Is there a easy way to make a directory on a server password protected?

seindal

11:33 pm on Dec 17, 2002 (gmt 0)

10+ Year Member



What kind of server are you using? IIS or Apache?

ikbenhet1

11:37 pm on Dec 17, 2002 (gmt 0)

10+ Year Member



Apache

seindal

11:45 pm on Dec 17, 2002 (gmt 0)

10+ Year Member



In that case you can add something like this to your .htaccess or in a Directory, Files or Location block in your server config.

AuthType Basic
AuthName "Somename descriptive name"
AuthUserFile /DIR/htpasswd
AuthGroupFile /DIR/htgroup

require valid-user

Replace DIR with the directory where you want to keep the password files.

The require line means that only a user with a valid password will be allowed to enter.

Read more here: [httpd.apache.org...]

ikbenhet1

12:13 am on Dec 18, 2002 (gmt 0)

10+ Year Member



Thanks.

Unfortunatly the apache server i use does not respect the .htaccess file i have put in the directory.
It doesn't ask for a password. I guess it's turned off, you see it's not my server it's located somewhere else so i cant check the server itself, just my account on the server.

but thanks anyway.

ggrot

12:15 am on Dec 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If that is the case, you have only 2 options. First, contact your hosting provider and ask if they could set it up for you. Second, Implement password protection with CGI scripts (not an easy way).

seindal

12:20 am on Dec 18, 2002 (gmt 0)

10+ Year Member



It is quite common to have htaccess turned off for performace reasons, but ask your provider to turn it on for you directories. Otherwise the configuration directives have to go into the main Apache configuration.

René.