Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-31-2003, 02:11 PM   #1
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
"Authorized Personnel Only"
AuthType Basic

<Limit GET>
user usr1
require user usr2

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, 02:37 PM   #2
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.



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 10:26 PM
Setting Apache Virtualhost Default Document? Seventh Linux - Software 1 03-21-2005 11:47 AM
User-dir security in Apache document roots papertygre Linux - Security 5 08-24-2004 01:24 PM
apache 1.3 config question; default document? soliant Linux - Software 1 03-25-2004 12:50 PM
Apache doesn't allow non-document-root access in default setup jenna_h Mandriva 1 10-28-2003 08:07 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:02 PM.

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