Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 13 Jan 2012, 05:28
Fready Fready is offline
 
Join Date: Nov 2010
Question .htaccess Password Generator

Trying to add this for my Admin Panel
http://tools.dynamicdrive.com/password/

But can't get it to work, must be doing something wrong.
I really don't know about this part:
2) Path to .htpasswd file relative to your server's root directory: (e.g. - /home/site_name/)
Or
3) File names to protect (Optional: leave empty if protecting folder):
Separate multiple files with a comma. ie: protected.htm, protected2.htm
Or this:

Upload ".htpasswd" to the root or a non publically accessible directory on your server.
Upload ".htaccess" to the directory you wish to protect, and inside this file, verify that the server path to the .htpasswd file above is valid:
AuthUserFile /home/mysite/.htpasswd
If you've uploaded the ".htpasswd" file to simply the same directory as your ".htaccess" file (less secure than root directory), then the path would look something like this instead:

AuthUserFile /home/mysite/public_html/mydirectory/.htpasswd
If anyone can simplify this for me I would be able to do it.
Reply With Quote
  #2  
Old 13 Jan 2012, 05:58
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
 
Join Date: Sep 2008
Real name: Michael Miller Jr
I like Dynamic Drive but these might be easier to use:

.htaccess authentication generator:
http://www.htaccesstools.com/htaccess-authentication/

.htaccess password generator:
http://www.htaccesstools.com/htpasswd-generator/

As for the path, in your admincp on the bottom left click Maintenance now click View PHP Info and your path will be shown there. Most prefer to upload the .htpasswd file (this file contains the password) into a directory just above public_html i.e.

/home/useraccount/htpasswds/.htpasswd

Instead of:

/home/useraccount/public_html/.htpasswd

This way the file is above the normal web folder level per say i.e. more secure .
__________________
Daddy Does Dios and Figs!
https://www.linkedin.com/in/thelastsuperman

Search - Use the search feature to find similar issues/answers.
Information - Include screenshots, copy/pasted error codes, url etc.
Fixed - Please return to your thread/post and let us know how it was fixed!
Thanks - For participating! Click the "Like" on a post if someone helped you!
Reply With Quote
  #3  
Old 13 Jan 2012, 06:11
Fready Fready is offline
 
Join Date: Nov 2010
Thanks for the reply,

As for the path, in your admincp on the bottom left click Maintenance now click View PHP Info and your path will be shown there.
Done that put a little lost to where to look next? here?:
Configuration File (php.ini) Path


Most prefer to upload the .htpasswd file (this file contains the password) into a directory just above public_html i.e.

/home/useraccount/htpasswds/.htpasswd

Instead of:

/home/useraccount/public_html/.htpasswd
So i am wanting to protect my Admin CP, i know in FTP how to get to my Forum root files, then what?
Reply With Quote
  #4  
Old 13 Jan 2012, 06:48
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
 
Join Date: Sep 2008
Real name: Michael Miller Jr
When viewing the PHP Info look for _SERVER["DOCUMENT_ROOT"]

Now after you create the .htaccess and .htpasswd files you upload the .htaccess to the /admincp directory and the .htpasswd to the level above public_html in a folder called .htpasswds (or create one if it does not exist).

*You must ensure though that the path in the .htaccess is correct and that it knows where to locate .htpasswd otherwise how does it know if your password is correct .
__________________
Daddy Does Dios and Figs!
https://www.linkedin.com/in/thelastsuperman

Search - Use the search feature to find similar issues/answers.
Information - Include screenshots, copy/pasted error codes, url etc.
Fixed - Please return to your thread/post and let us know how it was fixed!
Thanks - For participating! Click the "Like" on a post if someone helped you!
Reply With Quote
  #5  
Old 13 Jan 2012, 07:32
Fready Fready is offline
 
Join Date: Nov 2010
Originally Posted by TheLastSuperman View Post
When viewing the PHP Info look for _SERVER["DOCUMENT_ROOT"]

Now after you create the .htaccess and .htpasswd files you upload the .htaccess to the /admincp directory and the .htpasswd to the level above public_html in a folder called .htpasswds (or create one if it does not exist).

*You must ensure though that the path in the .htaccess is correct and that it knows where to locate .htpasswd otherwise how does it know if your password is correct .
Just tried all that and all i get now for the Admin CP is:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Took away the files and all is back to how it was..

I'll just keep reading and trying I guess..

--------------- Added 13 Jan 2012 at 09:31 ---------------

_SERVER["DOCUMENT_ROOT"]
/home/useraccount/public_html/forums

The AuthUserFile path is where I am getting problems, it's wrong
This is what TLS said for the path:
/home/useraccount/htpasswds/.htpasswds
I tried to use this one but it gave me the error:
/home/useraccount/htpasswds/forums/admincp/.htpasswds

Any ideas where I am going wrong?
Reply With Quote
  #6  
Old 13 Jan 2012, 09:39
ForceHSS's Avatar
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
read pm i sent you
Reply With Quote
  #7  
Old 13 Jan 2012, 14:12
Fready Fready is offline
 
Join Date: Nov 2010
Well it's took me all day but I got it to work.
Thanks for the help guys and to ForceHSS for helping, sorry about the Skype chat, I lost the net at the office as they were closing.
Reply With Quote
  #8  
Old 13 Jan 2012, 15:18
ForceHSS's Avatar
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
ok happy to help if you want a full list of what folders to put it in pm me
Reply With Quote
  #9  
Old 13 Jan 2012, 15:30
Fready Fready is offline
 
Join Date: Nov 2010
Will do ForceHSS

Kind of understand it more now, so I am guessing this can't be done for Boards which are on your Forum can it?
As they don't have their own folders to put the htaccess file into
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
[vRewrite] - htaccess generator Bhuwan vBulletin 3.5 Add-ons 30 06 Jun 2013 11:00
End-User Options Random Password Generator ChopSuey Modification Graveyard 18 07 Feb 2010 07:30
End-User Options Random Password Generator ChopSuey Modification Graveyard 0 06 Feb 2010 20:32



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting 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


New To Site? Need Help?

All times are GMT. The time now is 23:23.

Layout Options | Width: Wide Color: