Server rentals :: NFOservers.com

Forums

All times are UTC - 8 hours



Author Message
PostPosted: Fri Apr 20, 2012 3:38 pm 
Offline
A semi-regular
A semi-regular

Joined: Sat Jan 08, 2011 8:23 pm
Posts: 19
Hey guys,
I am following the instructions here: http://www.nfoservers.com/forums/viewtopic.php?f=19&t=3736 however I must have done something wrong and can't figure out what.

After following those instructions I attempted to login to my password protected directory, but instead it brought me to my custom error page. Now when I try to access that directory again it brings me straight to the error page, without letting me attempt to login again. I am fairly confident that I used the correct login information that I used.

The only thing I can think of is when I created the password hash, I ticked the MD5 box. Am I not supposed to?

Cheers!


Top
 Profile  
 
PostPosted: Fri Apr 20, 2012 4:10 pm 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9232
Location: Seattle
Yes, you will need to use a regular password and not an MD5 one.


Top
 Profile  
 
PostPosted: Fri Apr 20, 2012 4:41 pm 
Offline
A semi-regular
A semi-regular

Joined: Sat Jan 08, 2011 8:23 pm
Posts: 19
Thanks,
However now I seem to be locked out of the directory haha. Anytime I try to go to it, it takes me to my error page.
If I disable the .htaccess and .htpasswd files then I can access it, but while theyre enabled it wont let me.


Top
 Profile  
 
PostPosted: Fri Apr 20, 2012 8:21 pm 
Offline
A semi-regular
A semi-regular

Joined: Sat Jan 08, 2011 8:23 pm
Posts: 19
Okay I was able to generate a normal hash and not an MD5 hash. I uploaded that to my .htpasswd and tried to access the directory again, but it still didn't work. I used the login info I made and it still sent me to my error page.

Not quite sure what i'm doing wrong at this point. In the .htaccess, for this line:
AuthUserFile /usr/www/USERNAME/DIRECTORY_TO_PROTECT/.htpasswd

Username is the username given to me by nfo for the ftp to my website, correct?

Then in .htpasswd for this line:
LOGIN_NAME:HASHED_PASSWORD

LOGIN_NAME is anything I want it to be, correct? I can make one up?
Then HASHED_PASSWORD, I made a new password, put it in the hash generator, then copy pasted the Hashed password.

Anything i'm doing wrong?


Top
 Profile  
 
PostPosted: Fri Apr 20, 2012 9:42 pm 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9232
Location: Seattle
winds wrote:
Username is the username given to me by nfo for the ftp to my website, correct?

Yes, that's correct. It is your identifier (all lowercase).

Quote:
LOGIN_NAME is anything I want it to be, correct? I can make one up?

Yes.

Quote:
Then HASHED_PASSWORD, I made a new password, put it in the hash generator, then copy pasted the Hashed password.

That is correct, yes.


Top
 Profile  
 
PostPosted: Sat Apr 21, 2012 1:42 pm 
Offline
A semi-regular
A semi-regular

Joined: Sat Jan 08, 2011 8:23 pm
Posts: 19
Hm, so it seems I did everything correctly. Any idea why I wouldn't be able to log in successfully?


Top
 Profile  
 
PostPosted: Sat Apr 21, 2012 9:51 pm 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9232
Location: Seattle
Could you post your .htaccess and .htpasswd full files here?


Top
 Profile  
 
PostPosted: Sun Apr 22, 2012 5:18 am 
Offline
A semi-regular
A semi-regular

Joined: Sat Jan 08, 2011 8:23 pm
Posts: 19
No problemo,
I had to rename them to .txt to upload them, but in the ftp theyre renamed to .htaccess and .htpasswd. I also edited just the FTP login part and the directory, to avoid problems, but they are indeed correct on my ftp.

htaccess
htpasswd


Top
 Profile  
 
PostPosted: Sun Apr 22, 2012 9:24 am 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9232
Location: Seattle
You can just paste them directly here, in [code] blocks :). Easier, faster, and more permanent than doing an attachment or uploading them somewhere else.


Top
 Profile  
 
PostPosted: Sun Apr 22, 2012 9:37 am 
Offline
A semi-regular
A semi-regular

Joined: Sat Jan 08, 2011 8:23 pm
Posts: 19
Ahhh right, haha, my bad!

htaccess
Code:
# Access file
order allow,deny
allow from all
require valid-user
Authname "DirectoryName"
Authtype Basic
AuthUserFile /usr/www/website/admin/.htpasswd


htpasswd
Code:
admin:ghfN47dN7cEUo


Top
 Profile  
 
PostPosted: Sun Apr 22, 2012 10:15 am 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9232
Location: Seattle
Hmm, that does appear to be correct.


Top
 Profile  
 
PostPosted: Sun Apr 22, 2012 10:41 am 
Offline
A semi-regular
A semi-regular

Joined: Sat Jan 08, 2011 8:23 pm
Posts: 19
When logging into the directory, with those files, my login details would be:
Username: admin
Password: the password I typed in to get hashed, not the actual hashed password, right?

I don't know what else I could be doing wrong. Tried many times without success.


Top
 Profile  
 
PostPosted: Sun Apr 22, 2012 1:08 pm 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9232
Location: Seattle
Yes, that's correct.


Top
 Profile  
 
PostPosted: Sun Apr 22, 2012 5:08 pm 
Offline
A semi-regular
A semi-regular

Joined: Sat Jan 08, 2011 8:23 pm
Posts: 19
Hmm, do you have any ideas why it wouldn't be working?


Top
 Profile  
 
PostPosted: Sun Apr 22, 2012 7:57 pm 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9232
Location: Seattle
Not very many, unfortunately. You could triple-check that the files are in the right places and with the right permissions, and make sure that there isn't a .htaccess in another folder that's changing the URL.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
It is currently Tue May 21, 2013 5:49 am
Powered by phpBB® Forum Software © phpBB Group