LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   apache 1.3.27, basic authentication problem (https://www.linuxquestions.org/questions/linux-software-2/apache-1-3-27-basic-authentication-problem-63539/)

Robert0380 06-03-2003 09:49 PM

apache 1.3.27, basic authentication problem
 
here is the section in question from my httpd.conf file:

<Directory /var/www/html/pics>
AuthName "VIP Area"
AuthType Basic
AuthUserFile /home/username/.pass
require user username
</Directory>


i added this at the end of my httpd.conf file so that i could make that paritcular directory password protected. to set it up i did the fllowing:
Code:

htpasswd -c /home/username/.pass username
it then asked me for the password (twice) and accepted it.

now, when i go to the page, i get the popup and it has my site name the AuthName "VIP Area" shows up and everything.....but when i enter the username and password, i cannot gain access to the information, it treats it as if either the user name is wrong, the password is wrong or both and i get the access denied page after like 3 tries.

i even went as far as making the .pass file readable by everyone (group user and other) but that didnt work either.

ideas?

Thanks

Robert0380 06-05-2003 01:31 AM

bump: just moving it up to see if i get a reply this time....im still lost on this one, i tried it again and even read it in a book.....still a no-go.

trickykid 06-05-2003 09:35 AM

The problem is this:
Quote:

here is the section in question from my httpd.conf file:

<Directory /var/www/html/pics>
AuthName "VIP Area"
AuthType Basic
AuthUserFile /home/username/.pass
require user username
</Directory>
That configuration doesn't go in your httpd.conf file, you have to create a separate .htaccess file in the directory you want to protect.

Try searching on the subject, its brought up all the time as I know there is one going on in the Newbie forum as we speak.

Robert0380 06-05-2003 11:43 AM

yea, i saw that option listed but it also said it was recommended to not do it that way.....but if it works....im game.

oh, I have the wrox book Professional Apache...that's where i read that you should try to do it the other way. But like i said....whatever..doesnt matter to me, at this point i just want it to work.

akaBeaVis 06-08-2003 08:43 AM

It seems to me that you should try putting the password file (.pass) somewhere in the /var/www dir tree, and see if that works, I'm not sure that after startup when apache would normally go to a lower privelege level how far it's allowed to go to get at the files it needs.

pk21 06-08-2003 09:01 AM

Does apache have read permissions on the .pass file?

Robert0380 06-08-2003 09:51 PM

i got this to work a few days ago, i just put the directives
in the .htaccess file and did the override directive. I didnt get it
to work with directives in the regular .conf file, but it's cool i guess.


All times are GMT -5. The time now is 06:04 PM.