LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-31-2003, 01:11 PM   #1
WolfShade
LQ Newbie
 
Registered: Oct 2003
Location: CHICAGO, baby! :)
Posts: 1

Rep: Reputation: 0
Unhappy Apache question regarding security and default document


I am new to Linux AND Apache. I thought I understood the directions I have read in order to get the results I want, but I think I missed something, somewhere.

What I'm trying to do is set up an .htaccess file that will:
A) Require a login/pw in order to view the page.
B) Deny directory listing.
3) If the directory name is the last part of the URL, default to index.asp.

So far, A and B work fantastic! It asks for a login name and password, and if you don't enter a filename it displays the "You don't have permission" message.

Unfortunately, the default document is not automatically being displayed as a result of the directory listing deny. Here is what I have in my .htaccess file:

PHP Code:
AuthUserFile /usr/local/apache/sites/blahblahblah/.htpasswd
AuthGroupFile 
/dev/null
AuthName 
"Authorized Personnel Only"
AuthType Basic

<Limit GET>
require 
user usr1
require user usr2
</Limit>

Options -Indexes 
What have I done to prevent the default documents from displaying if only the directory is entered in the URL, sans filename? There is an index.asp file in the directory, but it's not displaying. Is it fairly easy to correct? If I need to add or remove anything from the httpd.conf file, cool.

Any assistance is greatly appreciated.
 
Old 10-31-2003, 01:37 PM   #2
tgflynn
Member
 
Registered: Oct 2003
Location: Rochester, New York (USA)
Distribution: Debian
Posts: 119

Rep: Reputation: 15
I think you need a DirectoryIndex directive. It should work in .htaccess.

Tim
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
changeing default document from index.html in apache thebover Linux - Software 3 03-30-2005 09:26 PM
Setting Apache Virtualhost Default Document? Seventh Linux - Software 1 03-21-2005 10:47 AM
User-dir security in Apache document roots papertygre Linux - Security 5 08-24-2004 12:24 PM
apache 1.3 config question; default document? soliant Linux - Software 1 03-25-2004 11:50 AM
Apache doesn't allow non-document-root access in default setup jenna_h Mandriva 1 10-28-2003 07:07 PM


All times are GMT -5. The time now is 01:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration