Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic Authentication 3

Status
Not open for further replies.

bubba20lb

MIS
Jun 13, 2004
16
US
Apache/2.0.40(Red Hat Linux)

I am trying to enable basic authentication on my own test jig. At this point security is not a issue, I am just trying to understand the process. My .htaccess and password files are located in /var/ I can not see the .htaccess file with the ls command. Is it hidden? I have created both of these files using tutorials found at apache.org. My .htaccess looks like this.

AuthType Basic
AuthName "New Restricted Files"
AuthUserFile /var/Require user test

I know that I am accessing this .htaccess file because I can change the AuthName stmnt and see the change reflected in my next login attempt. I have tried creating new Directorys with new .htaccess and password files but with no success. Are there changes that need to be made to the httpd.conf? Any help would be greatly appreciated.

Thanks,

bubba20lb
 
In httpd.conf you need to change:

AllowOverride None

to

AllowOverride AuthConfig

It appears a few times.
Randy
 
Also, FYI, files named with a leading dot are not normally visible to "ls". Use "ls -a" instead.
 
Also, are you trying to see your .htaccess files using "ls" or "ls -a"?

Since ".htaccess" begins with a dot, it isn't displayed with a standard "ls".



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Thanks for the suggestions.

I found 6 instances that needed changed as suggested.
Lines, 296, 331, 534, 548, 581, 900.

Stopped and started server. Still no luck with the log in. This has got to be something simple that I have not done correctly. Any more suggestions would be greatly appreciated.

Thanks,

bubba20lb
 
How did you create the password file? did you use:

htpasswd -c passfile username

?? If so check the permissions of the file. When I use that it only gives owner read & write. Try to "chmod 644" the file.

Hope this helps.

Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top