LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-27-2003, 03:39 PM   #1
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1/13.37/14 RedHat 6.2/7/EL6.5 SuSE 8.2/11.1
Posts: 471

Rep: Reputation: 30
apache authentication


I have created a user, and within their public_html directory, I have a small site, which I require users to be authenticated prior to gaining access.

Now I have set up the exact same site, which is located at /var/www and it works fine, but when I try to get it to authnticate using .htpasswd and .htaccess while using the fomat www.mydomain/~user/ it simply does not even ask for a user/pass.

As it works as expected in the /var/www location, then I would assume my .htaccess and .htpasswd files are configured properly.

Any ideas?
 
Old 02-27-2003, 03:46 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
This might have something to do with your AllowOveride directive in httpd.conf. You have to specify that httpd.conf may be overided by .htaccess files.

Look for something like this:
Code:
...
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/usr/local/httpd/htdocs">

AllowOverride All # or,
AllowOverride AuthConfig

...
 
Old 02-27-2003, 04:12 PM   #3
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1/13.37/14 RedHat 6.2/7/EL6.5 SuSE 8.2/11.1
Posts: 471

Original Poster
Rep: Reputation: 30
Cool, that seemed to do it...

I didn't know that you had to explicitly define parameters for different directories.

I obviously had the parameters etc for /var/www but not for /home/user/public_html or whatever.

Cheers mate...
 
Old 02-28-2003, 01:00 AM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Glad it works. Usually all apache directives work recursively from your document root but I guess that the ~user directory needs to be explicitly defined.
 
  


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
[SOLVED] Apache basic authentication gypsy_rabbi Linux - Security 3 01-17-2005 09:09 PM
Apache Authentication Problem sbrewer Linux - Software 1 08-23-2004 02:24 PM
Simple Apache Authentication ridertech Linux - Security 2 08-11-2004 04:15 PM
Apache Authentication AgentRn007 Linux - Software 2 03-27-2003 07:50 PM
apache authentication d-rez Linux - Security 1 05-30-2002 09:13 AM


All times are GMT -5. The time now is 06:07 PM.

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