LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-16-2004, 02:00 PM   #1
wiggywag
Member
 
Registered: Sep 2003
Location: Denmark
Distribution: Slackware 9.1
Posts: 36

Rep: Reputation: 15
problem getting .htaccess files work


Hi!

I have apache 1.3 running on my Slackware computer

I set up user and password in a file called passwords under usr/bin/ with the htpasswd utility

I have made a .htaccess file in a htdocs folder

The file look like this

AuthType Basic
AuthName "By Invitation Only"
AuthUserFile /usr/bin/passwords
Require user stig


I restarted apache, even if that should not be necesary with .htaccess files. When I thereafter open the folder in my browser under //localhost/test/ it shows the page without requesting username and password!

What is wrong???



 
Old 02-16-2004, 02:11 PM   #2
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
You need to set the appropriate AllowOverride settings on the directory in the main config file (httpd.conf)
 
Old 02-16-2004, 02:55 PM   #3
wiggywag
Member
 
Registered: Sep 2003
Location: Denmark
Distribution: Slackware 9.1
Posts: 36

Original Poster
Rep: Reputation: 15
what is the appropriate way to do that? How should the settings look like!

I'm a beginner, so give me little more info, please!

Thanks

Last edited by wiggywag; 02-16-2004 at 03:01 PM.
 
Old 02-16-2004, 05:28 PM   #4
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
Clicky here and go through ALL instructions inside there to get a fully working password-protected dir in your web site.
 
Old 02-17-2004, 03:32 AM   #5
wiggywag
Member
 
Registered: Sep 2003
Location: Denmark
Distribution: Slackware 9.1
Posts: 36

Original Poster
Rep: Reputation: 15
thanks a lot, I will study the article
 
Old 02-17-2004, 06:23 AM   #6
Kristijan
Member
 
Registered: Sep 2003
Location: Melbourne, Australia
Distribution: NetBSD 3.0.1, Slackware 10.1
Posts: 394

Rep: Reputation: 30
Search your httpd.conf untill you come across this section...

Code:
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
    AllowOverride AuthConfig
Change your AllowOverride option to AuthConfig. From reading your first post, the rest should work.

I have this site bookmarked and use i quite often, the doc relates to Apache 2.0 but it's works with 1.3 also - http://httpd.apache.org/docs-2.0/howto/auth.html

Good Luck
Kristijan
 
Old 02-17-2004, 01:21 PM   #7
wiggywag
Member
 
Registered: Sep 2003
Location: Denmark
Distribution: Slackware 9.1
Posts: 36

Original Poster
Rep: Reputation: 15
Yes great

I changed the override code, and everything works perfect now!

Thanks a lot!!!
 
  


Reply



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 files doesn't work in home directories rehtorisi Linux - Software 3 08-08-2005 08:02 AM
htaccess don't work???? cuencano Linux - Security 3 07-23-2005 06:09 AM
.htaccess files joel112 Linux - Software 3 09-30-2003 11:28 AM
htaccess not work on apache 2 adrianmak Linux - Networking 2 01-09-2003 02:25 AM
Cannot see .htaccess and .htpasswd files John_Saunders Linux - Newbie 2 07-21-2002 09:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:44 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
Open Source Consulting | Domain Registration