Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 13th, 2002, 09:58 AM
@lex26 @lex26 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Posts: 4 @lex26 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
-== Directory listing with Authentification ==-

Hi all, me again

When people logging on the http server (Apache), there is a index.html that is loaded (in /develop/opt/apache/htdocs/index.html)

In this directory, I've put 2 symbolic links.

1: Documentation -> /develop/workspace/documentation
2: Public_Access -> /develop/workspace/public

What I want to do is that every person that goes on my server, that the index.html is loaded (that's what's happening right now), but without asking for an authentification. You see what I means.

And then, when the user will click on documentation, they will have a prompt for user/pass to login. But, in the public section, everybody would be allowed to go in, so no login.

What I've done, I modified the httpd.conf file, and added these line for directory settings:

Quote:
<Directory />
Options FollowSymLinks
AllowOverride None
AuthType Basic
AuthName "Internal"
AUthUserFile /develop/opt/apache/conf/passwd
Require user xdsldev
</Directory>


<Directory /develop/workspace/documentation>
Options FollowSymLinks
AllowOverride None
AuthType Basic
AuthName "Internal"
AUthUserFile /develop/opt/apache/conf/passwd
Require user xdsldev
</Directory>


<Directory /develop/opt/apache/htdocs>
Allow from all
</Directory>


So, what it is supposed to do is do not let anyone entering the first page right? since the directory /develop/opt/apache/htdocs is where the index.html is...

After, once clicking on Documentation, it should prompt the user...

That's not what's happening here... As soon as I get on the server, you get a prompt, and then, no more prompt...

How could I fix that???

Thanx a lot!

Reply With Quote
  #2  
Old March 13th, 2002, 03:20 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
First off, DO NOT add -== in your subject title to make it more attractive, tell you what, it doesn't. Doing so would make your message a lower priority or it won't be read at all.

You only need to add this:
Code:
<Directory "/develop/workspace">
Options FollowSymLinks
AllowOverride None
AuthType Basic
AuthName "Internal"
AUthUserFile /develop/opt/apache/conf/passwd
Require user xdsldev
</Directory>

and remove your other two, especially the first one ( <Directory />) with Auth* lines.

BTW, Apache has a directive called Alias to do all this, without having to create symlink.
For example:
Code:
Alias /documentation/ "/develop/workspace/documentation/"

Alias /public/ "/develop/workspace/public/"


>> As soon as I get on the server, you get a prompt

Because you have a default-to-authenticate policy and you didn't use Satisfy directive.

>> and then, no more prompt...

Because that's inherit from its parent directory configuration and your browser remembers the credential. It's a feature, not a bug, therefore you don't need to fix it.

Reply With Quote
  #3  
Old March 14th, 2002, 11:25 AM
@lex26 @lex26 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Posts: 4 @lex26 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Well, sorry for putting -== xxxxxx ==-... won't do it anymore

And for the problem... I fixed it, in about the same way you told me.

Thanx for helping me though.

Have a nice day freebsd

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > -== Directory listing with Authentification ==-


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT