Solved

Apache on Linux .htaccess file configuration error message

Posted on 2010-11-15
8
744 Views
Last Modified: 2012-05-10
Apache is hosted on CentOS5.5 server.  There needs to be password protected stuff in the /services/apache/htdocs/TOOLS directory.  Basic information is provided under.  It so appears that the .htpasswd file is not being read properly.  Apache does have read access to the .htpasswd file.  

Could you tell me what appears to be the source of problem?

ERROR MESSAGE:
[Mon Nov 15 11:40:32 2010] [crit] [client 10.25.3.34] configuration error:  couldn't check access.  No groups file?: /TOOLS/
<Directory "/services/apache/htdocs">

RELATED CONFIG in httpd.conf FILE
    #Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride All
#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all
</Directory>

LOCATION AND PERMISSION OF THE REQUIRED FILES
-rw-r--r-- 1 root apache 157 Nov 15 11:14 /services/www/htdocs/TOOLS/.htaccess
-rw-r--r-- 1 root apache  18 Nov 15 11:00 /services/www/htdocs/TOOLS/.htpasswd

CONTENTS OF .htaccess FILE
AuthName "Access is Denied. Enter password"
AuthType Basic
AuthUserFile /services/apache/htdocs/TOOLS/.htpasswd
<Limit GET POST>
Require valid-user
</Limit>
0
Comment
Question by:farzanj
  • 3
  • 3
  • 2
8 Comments
 
LVL 4

Expert Comment

by:max-hb
ID: 34138149
Typo in your .htaccess?!
AuthUserFile /services/apache/htdocs/TOOLS/.htpasswd
vs.
AuthUserFile /services/www/htdocs/TOOLS/.htpasswd
0
 
LVL 31

Author Comment

by:farzanj
ID: 34138700
That was a nice catch.  But still the error persists.  Exactly the same.

CONTENTS OF FILE: /services/www/htdocs/TOOLS/.htaccess
AuthName "Access is Denied. Enter password"
AuthType Basic
AuthUserFile /services/www/htdocs/TOOLS/.htpasswd
<Limit GET POST>
Require valid-user
</Limit>

RELATED httpd.conf FILE:
<Directory "/services/www/htdocs/TOOLS">
      AllowOverride AuthConfig
</Directory>
0
 
LVL 3

Expert Comment

by:Prograministrator
ID: 34138753
check the path,

you typed two different paths in your question.

/services/apache/htdocs/TOOLS/.htpasswd

/services/www/htdocs/TOOLS/.htpasswd

if the folder name is "www" change the path in your htaccess file and httpd.conf (<Directory "/services/apache/htdocs">)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Accepted Solution

by:
max-hb earned 350 total points
ID: 34138830
Have you installed the neccessary apache modules? You should need:
mod_auth_basic
mod_authn_file
mod_authz_user

You can check if these modules are installed by creating a file phpinfo.php on your web server with the following content:

<?php
phpinfo();
?>

Open that file in your web browser and look at the section called "Loaded modules".
0
 
LVL 3

Assisted Solution

by:Prograministrator
Prograministrator earned 150 total points
ID: 34138849
Sorry,
I did not notice for your last comment.

Check the required modules is loaded well,

means check this three lines in your httpd.conf :

LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_user_module modules/mod_authz_user.so
0
 
LVL 31

Author Comment

by:farzanj
ID: 34139473
Thank you.  This fixed the problem.

I kind of knew that one of the modules was missing but I didn't know which one.

So the question becomes this:
Is there some Apache documentation of a way to query which functionality is obtained by which modules?

Functionality ---> Modules list
0
 
LVL 4

Expert Comment

by:max-hb
ID: 34139546
At http://httpd.apache.org/docs/2.0/en/mod/ you'll find a extensive list of apache modules organized by categories.
0
 
LVL 31

Author Closing Comment

by:farzanj
ID: 34144647
Thank you guys.  The last comment did not completely answer my question.  May be this is it but I wanted to know better place where it would map major Apache functionalities with modules.  May be there isn't one but please post it if you find one.

I appreciate your help.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

685 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