Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > .htaccess and logging issues

.htaccess and logging issues
Thread Tools
Forum Regular
Join Date: Jan 2002
Location: Manitoba
Status: Offline
Reply With Quote
Apr 10, 2006, 10:17 PM
 
Hello. I was hoping that someone may be able to help me out here. I have been trying very hard to get one diectory on my webspace passowrd protected. I managed to finally get it set up with the application Apache Protect and an online tutorial.

Now that I have .htaccess functioning I cannot login and I have been unable to find any sort of info on what to do.

Since I have no clue what may be the problem I am unsure which files or excerps of files that you will require so please let me know and I will get what you need.

So far I have made the required modifications to /private/etc/httpd/ http.conf and /private/etc/httpd/users/ *.conf. As far as I know my .htaccess file is configured properly.
(Last edited by Sarah31; Apr 10, 2006 at 10:25 PM. (Reason:title typo))
     
Senior User
Join Date: Jul 2004
Status: Offline
Reply With Quote
Apr 10, 2006, 10:43 PM
 
The .htaccess needs to have this

Code:
AuthType Basic AuthName "Members Only Access" AuthUserFile "/private/etc/passwd/protected" require valid-user
and the protected file needs to do a username:password
the password needs to be encrypted. you can find a .htaccess password protect password maker using google.
You shouldn't make fun of nerds... you'll be working for one some day.
     
Sarah31  (op)
Forum Regular
Join Date: Jan 2002
Location: Manitoba
Status: Offline
Reply With Quote
Apr 11, 2006, 12:13 AM
 
Thanks. I was under the impression that placing the user file just about anywhere except the same directory should have worked. I moved it to /private/etc/password/ and it worked great.

Again Thank you very much I was going nuts.
     
Sarah31  (op)
Forum Regular
Join Date: Jan 2002
Location: Manitoba
Status: Offline
Reply With Quote
Apr 11, 2006, 12:36 PM
 
Just one follow-up question with respect to logging. I assume in order to log out you have to remove the cookie that is made when you log in?
     
Senior User
Join Date: Jul 2004
Status: Offline
Reply With Quote
Apr 11, 2006, 06:02 PM
 
yes if your computer saved the cookie you will need to.

but you dont have to put it their. its just what i thought looked the best.
i didn't even know that the directory existed. on my webserver online i got a folder under the root i use to keep files of all the places that use password protected directories. so i thought it would work. Most likely a typo in ur htaccess or something that didn't let it work right.
You shouldn't make fun of nerds... you'll be working for one some day.
     
Senior User
Join Date: Aug 2002
Status: Offline
Reply With Quote
Jul 14, 2006, 10:26 AM
 
how would i access /private or whatever if i have a webhost? not sure what i should name my passwd file and how to manage to put it in the proper directory?
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:36 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2