Apache and <Files> Container

Posted on 2004-10-31
Last Modified: 2010-03-04
In my httpd.conf I have the following for example

ScriptAlias /perlstuff/ "/home/meme/apache/perlstuff"

<Files /home/meme/apache/perlstuff/ >
AuthUserFile /home/meme/apache/conf/.pwdfile
AuthName "Protected File"
AuthType Basic
Require valid-user

Whenever I go to for example


I can still access it, it doesn't prompt me.  I have the .pwdfile created and correctly in the conf directory so I'm not exactly sure where I'm going wrong.  I can do directories and wildcards but can't seem to do single files properly.

Question by:kevin_ma
    1 Comment
    LVL 38

    Accepted Solution

    You can't control acess to a single file, you can only control access to dir level.

    You can use .htaccess files or a single access.conf (you can use a different file name
    as long as you defined it in your httpd.conf file) to control the dir access.

    Fot  authentication using .htaccess, have a look at the following Tutorial:

    Apache FAQ:


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
    If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
    This video Micro Tutorial is the first in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 ( But the ability to create custom scanning profiles al…
    In this Experts Exchange video Micro Tutorial, I'm going to show how small business owners who use Google Apps can save money by setting up what is called a catch-all email address in their Gmail accounts. By using the catch-all feature, small busin…

    877 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now