Solved

Apache on Linux .htaccess file configuration error message

Posted on 2010-11-15
8
743 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
The viewer will learn how to dynamically set the form action using jQuery.

808 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