Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

.htaccess problem

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Forbidden  
Author Message
alwin

External


Since: Aug 18, 2003
Posts: 2



(Msg. 1) Posted: Mon Aug 18, 2003 5:14 am
Post subject: .htaccess problem
Archived from groups: alt>apache>configuration (more info?)

Hi all,

First of all, sorry for the long story, but I hope it will make my problem
clear and leaves as little questions unanswered as possible.

I'm experiencing a problem with .htaccess that seems to be quite common.
Unfortunately, after spending hours of searching, I haven't been able to
find a proper solution yet.

My goal: I want to password-protect just one directory on my server, using
..htaccess and .htpasswd
The problem: Every time I visit the directory, a login-box appears and after
trying to login for three times, I get an "Authorization Required" error
message.

In my httpd.conf I've got the line:
AllowOverride All
and:
AccessFileName .htaccess


This is the the entire content of my .htaccess file:
--
AuthUserFile /root/.htpasswd
AuthGroupFile /dev/null
AuthName "Enter password"
AuthType Basic

require valid-user
--

And this is how my .htpasswd file looks like:
--
alwin:<bunch of characters>
--

This .htpasswd file has been generated by using the htpasswd command in my
Apache's bin-directory. Permissions on both files are set to 777, just to be
sure that this isn't coursing the problem. The path names are correct. No
other .htaccess files exist on my system. And yes, I typed the password
correctly. I'm using RedHat 7.0 and Apache 2.0.45.

Is there anyone who can tell me what the problem might be?

Thx in advance,
Alwin

 >> Stay informed about: .htaccess problem 
Back to top
Login to vote
admin34

External


Since: Jul 01, 2003
Posts: 47



(Msg. 2) Posted: Mon Aug 18, 2003 8:38 am
Post subject: Re: .htaccess problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Alwin" <alwin.RemoveThis@vhl.tudelft.nl> wrote in message
news:bhp5oh$d6l$1@news.tudelft.nl...
 > Hi all,
 >
 > First of all, sorry for the long story, but I hope it will make my problem
 > clear and leaves as little questions unanswered as possible.
 >
 > I'm experiencing a problem with .htaccess that seems to be quite common.
 > Unfortunately, after spending hours of searching, I haven't been able to
 > find a proper solution yet.
 >
 > My goal: I want to password-protect just one directory on my server, using
 > .htaccess and .htpasswd
 > The problem: Every time I visit the directory, a login-box appears and
after
 > trying to login for three times, I get an "Authorization Required" error
 > message.
 >
 > In my httpd.conf I've got the line:
 > AllowOverride All
 > and:
 > AccessFileName .htaccess
 >
 >
 > This is the the entire content of my .htaccess file:
 > --
 > AuthUserFile /root/.htpasswd
 > AuthGroupFile /dev/null
 > AuthName "Enter password"
 > AuthType Basic
 >
 > require valid-user
 > --
 >
 > And this is how my .htpasswd file looks like:
 > --
 > alwin:<bunch of characters>
 > --
I have just had this problem and thanks to help from this group I found the
answer

First check your Error log - if you have an error message like
[Fri Aug 15 05:56:31 2003] [error] [client 10.69.70.202] guest: not a valid
FDN:

Then you might find that this is caused by either mod_auth_ldap or
mod_auth_nds

If you are running SuSE linux then it will be in the
/etc/httpd/suse_addmodule.conf and suse_loadmodule.conf

also at the start of the .htaccess file you need to add the followiing line
AuthAuthoritative on

Hope this helps

Mike.<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: .htaccess problem 
Back to top
Login to vote
alwin

External


Since: Aug 18, 2003
Posts: 2



(Msg. 3) Posted: Tue Aug 19, 2003 3:37 am
Post subject: Re: .htaccess problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Michael Forster" <admin DeleteThis @muckworld.com> wrote in message
news:3f40502a$1@news.userve.net...
 >
 > "Alwin" <alwin DeleteThis @vhl.tudelft.nl> wrote in message
 > news:bhp5oh$d6l$1@news.tudelft.nl...
  > > Hi all,
  > >
  > > First of all, sorry for the long story, but I hope it will make my
problem
  > > clear and leaves as little questions unanswered as possible.
  > >
  > > I'm experiencing a problem with .htaccess that seems to be quite common.
  > > Unfortunately, after spending hours of searching, I haven't been able
to
  > > find a proper solution yet.
  > >
  > > My goal: I want to password-protect just one directory on my server,
using
  > > .htaccess and .htpasswd
  > > The problem: Every time I visit the directory, a login-box appears and
 > after
  > > trying to login for three times, I get an "Authorization Required" error
  > > message.
  > >
  > > In my httpd.conf I've got the line:
  > > AllowOverride All
  > > and:
  > > AccessFileName .htaccess
  > >
  > >
  > > This is the the entire content of my .htaccess file:
  > > --
  > > AuthUserFile /root/.htpasswd
  > > AuthGroupFile /dev/null
  > > AuthName "Enter password"
  > > AuthType Basic
  > >
  > > require valid-user
  > > --
  > >
  > > And this is how my .htpasswd file looks like:
  > > --
  > > alwin:<bunch of characters>
  > > --
 > I have just had this problem and thanks to help from this group I found
the
 > answer
 >
 > First check your Error log - if you have an error message like
 > [Fri Aug 15 05:56:31 2003] [error] [client 10.69.70.202] guest: not a
valid
 > FDN:
 >
 > Then you might find that this is caused by either mod_auth_ldap or
 > mod_auth_nds
 >
 > If you are running SuSE linux then it will be in the
 > /etc/httpd/suse_addmodule.conf and suse_loadmodule.conf
 >
 > also at the start of the .htaccess file you need to add the followiing
line
 > AuthAuthoritative on
 >
 > Hope this helps
 >
 > Mike.
 >
 >

Thx for the suggestion, Mike. Your solution didn't work, but mentioning the
error log helped Smile

Stupid as I have been, I never checked the error logs. After I did so, I
found the following lines:
[Mon Aug 18 23:44:29 2003] [error] [client x.x.x.x] (13)Permission denied:
Could not open password file: /root/.htpasswd
[Mon Aug 18 23:44:29 2003] [error] [client x.x.x.x] user alwin not found:
/test1

It turned out that not only the permissions of the .htpasswd file had to be
something like 755, but also the permissions of the directory in which the
file is stored. I moved the .htpasswd file to /var/www/ and gave both the
directory as the file 755 permissions, changed the path in my .htaccess and
problem solved!<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess problem 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
.htaccess problem - hello, I have disabled directory browsing for all folders on my server and written a .htaccess allowing it for one folder. I would like to know what to put in a .htaccess file so that full access to all directories is enabled for only two IP addresses. ...

I cant get .htaccess to work - I am runnning apache on SuSE 7.2 pro, I have several Virtual hosts all working correctly - I want to password protect one of the directories. but it doesnt want to work. I have added into the httpd.conf as follows <VirtualHost 212.19.66.163:80> ...

forcetype + filesmatch in htaccess - I have write a script based on a htaccess file: Here it is: <FilesMatch "directory"> <font color=purple> ; ForceType application/x-httpd-php</font> </FilesMatch> But the server don't care about it. An idea?

Can htaccess include another file? - Hi, I want to achieve something like this. Imagine I have a file called textfile_ips.txt which contains a whole bunch of IP addresses which I want to blocked, one per line. Can I do something like this? <Files "somefile.html"> deny ...

newbie question about .htaccess - I have a private website folder which I would like to password protect so I have followed the instructions on the Apache website and some other sites to write an .htaccess file. This results in a pop up box which asks for the username and password. The..
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]