LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-03-2014, 07:54 AM   #1
ameharhughes
LQ Newbie
 
Registered: Sep 2012
Posts: 4

Rep: Reputation: Disabled
Apache Basic Auth but not on subdirectories


Hello,

I am running a Ubuntu 10.04 server with Apache 2.2 and have put a htaccess file for the whole site - this works;
=======================================
AuthUserFile /var/www/.htpasswd
AuthType Basic
AuthName Sign In
Require valid-user

<Files reports/*>
allow from all
</Files>
=======================================

I have a subdirectory called reports and a directories for the years within this. I do not want to password protect these, I have the below as the htaccess file within this directory
=======================================
Order allow,deny
Allow from all
Satisfy Any
=======================================

So the wierd thing in the pages load and asks for the user/pass but then pressing escape loads the page normally, has anyone seen this before or can suggest what to check? I have looked the conf file for the site and there is nothing I see to conflict with this.


Thanks
 
Old 10-03-2014, 08:14 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Check to see if there's ANYTHING on the page that loads resources from outside the reports/ folder.

For example if you don't have a page there and are using Apache's automatic "Index" function then I believe that tries to load graphics from elsewhere.
 
Old 10-03-2014, 11:13 AM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
.htaccess files are hierarchical. Top > down
If you wish to protect one and not the sub-DIRs, then use the appropriate declarations in the apache/../site.conf
 
  


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
Avahi Error Message while using Basic Auth in Apache 2.2 under Fedora 11 mejohnsn Linux - Server 0 12-01-2009 07:10 PM
apache: basic auth over ssl (redirected) mattydee Linux - Server 4 11-09-2009 11:02 PM
[PROFTPD] LDAP vs basic auth. Creak Linux - Security 1 09-21-2004 07:52 PM
basic auth in apache CodeGeek Linux - Newbie 2 04-14-2004 09:27 AM
Apache 1.3 and basic auth luger Linux - Networking 4 05-17-2002 05:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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