Directory Indexing With Basic Auth

Directory Indexing With Basic Auth

Post by Kevi » Wed, 18 Dec 2002 05:00:40



I've just upgrade my Apache httpd from 1.3 to 2.0.40 and I'm found one
strange problem. In 2.0.40 when I setup a AuthType Basic the directory
listing's don't show the directory until after you enter the
user/password.  How do I shut this off?

The issues is I want to be able to see all public/secure directories,
then click on one and be prompted if it is secure. This was the
behavoir in 1.3.

Any ideas on how to make this happen?

Thanks,
Kevin

 
 
 

Directory Indexing With Basic Auth

Post by Shay Hug » Thu, 19 Dec 2002 06:36:42


you should define such things in the .htaccess file
use htpasswd binary to generate a password and use the .htaccess files you
create in the secured dirs.

example:

AuthUserFile /opt/local/apache2/passwd/.htpasswd
AuthName "dir secured access"
AuthType Basic

<Limit GET POST >
require valid-user
</Limit>

good luck.

- Shay Hugi
- Mpthrill.com Software Industries


Quote:> I've just upgrade my Apache httpd from 1.3 to 2.0.40 and I'm found one
> strange problem. In 2.0.40 when I setup a AuthType Basic the directory
> listing's don't show the directory until after you enter the
> user/password.  How do I shut this off?

> The issues is I want to be able to see all public/secure directories,
> then click on one and be prompted if it is secure. This was the
> behavoir in 1.3.

> Any ideas on how to make this happen?

> Thanks,
> Kevin


 
 
 

Directory Indexing With Basic Auth

Post by 2Host.com - Rober » Wed, 18 Dec 2002 21:29:24



> you should define such things in the .htaccess file
> use htpasswd binary to generate a password and use the .htaccess files you
> create in the secured dirs.

> example:

> AuthUserFile /opt/local/apache2/passwd/.htpasswd
> AuthName "dir secured access"
> AuthType Basic

> <Limit GET POST >
> require valid-user
> </Limit>

> good luck.

You should limit more than GET and POST, those are better removed.

You shouldn't top post.
--
Regards,

Server admin, support & programing for shared & dedicated web servers
Secure, reliable hosting you expect and deserve! http://www.2host.com

 
 
 

Directory Indexing With Basic Auth

Post by Kevi » Sun, 22 Dec 2002 04:00:28


I'm sorry I guess I'm either doing something wrong or not describing
my
problem correctly.

I tried your suggestions but the only thing I had that was different
was
I was missing the <Limit>. I included that and it still does the same
thing.

Let me see if I can explain my self... In my doc root, I have two
directories.

public/
private/

public doesn't have a .htaccess file where private does. Now, If I
type
in http://server/ the directory listing show just private. If I then
hit http://server/private I get the password prompt. I enter the
password
in correctly and i see the contents of private. Now the confusing part
is
sometimes after I've logged in, if I go back to http://server it shows
both public and private.

So my question is, how do I make private always show up in the
directory listing. If I remove the .htaccess file it will show up but
then it won't
be secured.

Any ideas?
--kevin


> you should define such things in the .htaccess file
> use htpasswd binary to generate a password and use the .htaccess files you
> create in the secured dirs.

> example:

> AuthUserFile /opt/local/apache2/passwd/.htpasswd
> AuthName "dir secured access"
> AuthType Basic

> <Limit GET POST >
> require valid-user
> </Limit>

> good luck.

> - Shay Hugi
> - Mpthrill.com Software Industries



> > I've just upgrade my Apache httpd from 1.3 to 2.0.40 and I'm found one
> > strange problem. In 2.0.40 when I setup a AuthType Basic the directory
> > listing's don't show the directory until after you enter the
> > user/password.  How do I shut this off?

> > The issues is I want to be able to see all public/secure directories,
> > then click on one and be prompted if it is secure. This was the
> > behavoir in 1.3.

> > Any ideas on how to make this happen?

> > Thanks,
> > Kevin

 
 
 

1. Problems w/ Directory Indexing and Basic Auth in apache 2.0

I recently updated Apache 1.3 to 2.0 and I'm seeing some strange
behavior with the directory listings. In my doc root, I have two
directories.

public/
private/

I setup private to use BaseAuth using a .htaccess file and public does
not have
a .htaccess file.

Now, If I type in http://localhost/ the directory listing show just
public. If I then hit http://localhost/private I get the password
prompt. I enter the password in correctly and I see the contents of
private. Now the confusing part is
sometimes after I've logged in, if I go back to http://localhost it
shows both public and private. Its almost like, the directory listing
checks to see if you
have access to the directoies before listing them.

So my question is, how do I make private always show up in the
directory listing. If I remove the .htaccess file it will show up but
then it won't be secured. This was also working perfectly in 1.3.

Any ideas?
--kevin

2. How much memory does a process use?

3. listing a directory with an index.html (even with DirectoryIndex index.html)

4. Solved: Crash: mail, news fills swap on Linux on download

5. user auth for all files except /index.html?

6. Problem installing KDE on RH5.1

7. Apache SSL / Basic auth

8. eXcursion and CDE

9. lynx and Basic Auth restriction

10. NES: Configuring certs then fallback to basic auth?

11. Virtual Host & Basic Auth

12. Help: Access server with SSL and Basic Auth

13. Basic Auth and Webdav access