logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: htaccess problems
Author
Steebin



Joined: 05 Mar 2007
Posts: 3

PostPosted: Mon 05 Mar '07 23:39    Post subject: htaccess problems Reply with quote

Hi, I tried to setup an .htaccess file on my server to protect a directory and it seems to work on the protection part but the login promt just keeps refreshing and then eventually gives me a 401 error. Anyone have any idea why this happens? I am running windows server 2003. Thanks
Back to top
VoodooMill



Joined: 11 Jan 2007
Posts: 60

PostPosted: Tue 06 Mar '07 2:35    Post subject: Reply with quote

This happens when the authentication information provided by the user doesn't match the information in the authentication source.

Start by making sure you are authenticating against the correct AuthUserFile. If you are using AuthGroupFile make sure it is correct also.

Next, be sure you created the appropriate entries in your AuthUserFile location.

So if you have AuthUserFile C:/Auth/.htpasswd make sure you've run htpasswd from your Apache22\bin folder to get the username/password into the file you are pointing to with AuthUserFile.

<drive>:\...\Apache22\bin>> htpasswd -b C:\Auth\.htpasswd <username> <password>

That is a good start. Confirm the above is good to go and let us know. If it doesn't fixy we can go from there.

Also, please post the contents of your .htaccess file. That'll keep us from having to guess what you may have left out of your config. Very Happy
Back to top
Steebin



Joined: 05 Mar 2007
Posts: 3

PostPosted: Tue 06 Mar '07 17:59    Post subject: Reply with quote

Here is my .htaccess file, I created the password file using the dos commands and its a simple login and pw nothing special, so im not typing the username and pw wrong

Code:

AuthType Basic
AuthName "My Private Area"
AuthUserFile /www/HF/xd/arch/htpasswd.txt

<Limit GET POST>
Require valid-user
</Limit>


Thanks for the help
Back to top
VoodooMill



Joined: 11 Jan 2007
Posts: 60

PostPosted: Tue 06 Mar '07 19:04    Post subject: Reply with quote

Hi again Steebin,

Try an absolute path for the AuthUserFile instead of a relative path.

AuthUserFile <drive>:/.../www/HF/xd/arch/htpasswd.txt
Back to top
Steebin



Joined: 05 Mar 2007
Posts: 3

PostPosted: Tue 06 Mar '07 21:08    Post subject: Reply with quote

ahh thx, that did the trick, figures it was something simple, thanks again
Back to top
htmldad



Joined: 06 Mar 2007
Posts: 5
Location: US

PostPosted: Tue 06 Mar '07 22:14    Post subject: 2.2.4 problems Reply with quote

I too downloaded the 2.2.4 binary version of Apache. I'm usings windows xp os.
I think my problem is in windows because I cannot telnet localhost 80. I have posted and emailed everywhere with no response. This forum included.
I am a green horn and would like to get an answer so I continue to learn PHP. Sorry I can't help. Just wanted to offer some sympathy.
Back to top
htmldad



Joined: 06 Mar 2007
Posts: 5
Location: US

PostPosted: Tue 06 Mar '07 22:32    Post subject: sorry Reply with quote

Sorry, you had to listen to my sob story. I replied to the wrong message.
Back to top


Reply to topic   Topic: htaccess problems View previous topic :: View next topic
Post new topic   Forum Index -> Apache