LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-22-2005, 01:08 PM   #1
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Rep: Reputation: 30
.htpasswd/.htaccess Help


I didnt really know where to place this thread, so I figured here sence it has to do with login security to a webdir

I am running apache httpd 2.0.52
Fedora Core 3

First of all I enabled in httpd.conf to Allowoverride All


with htpasswd I created a password file in
/usr/local/apache/htpasswd/.htpasswd


This is what my .htaccess file looks like
and is placed in /var/www/html/downloads

Code:
AuthUserFile /usr/local/apache/htpasswd/.htpasswd
AuthType Basic
AuthName "Please Enter Password"
require valid-user
I created the .htaccess file with webmin

I have restarted apache and when I go into my web directory from another computer, I am not prompted for login.

Any help would be great!

Last edited by GUIPenguin; 02-22-2005 at 01:10 PM.
 
Old 02-22-2005, 01:34 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Where in httpd.conf did you specify the AllowOverride directive?
 
Old 02-22-2005, 01:40 PM   #3
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Original Poster
Rep: Reputation: 30
It was like this before
Code:
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
And I changed it to this
Code:
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
 
Old 02-22-2005, 01:50 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Is the directive AccessFileName set to something other than .htaccess? If it doesn't exist then it defaults to .htaccess.

Are there any errors in your error_log when you try to access the page or when you startup apache?
 
Old 02-22-2005, 02:01 PM   #5
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Original Poster
Rep: Reputation: 30
I fugured it out.

This is what I put in its place

Code:
<Directory />
AllowOverride None
</Directory>
<Directory /var/www/html/downloads>
AllowOverride All
</Directory>
SO I can better control where apache looks for the .htaccess files
and took out Options FollowSymLinks

Last edited by GUIPenguin; 02-22-2005 at 02:23 PM.
 
Old 02-22-2005, 02:21 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
What do you get when you access the page? just an empty directory listing?
 
Old 02-22-2005, 02:25 PM   #7
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Original Poster
Rep: Reputation: 30
Thanks alot David_ross
I edited my post at the same time you posted
 
  


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
.htaccess luca2005 Linux - Software 2 01-01-2005 07:38 PM
.htaccess kidestranged Linux - General 1 01-26-2004 10:18 AM
Htaccess DoobyWho Linux - General 4 04-28-2003 01:01 PM
.htaccess raek Linux - Newbie 1 08-17-2002 11:53 PM
.htaccess bretthoward Linux - Security 5 04-02-2001 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:23 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