View Full Version : .htaccess Password Generator
Fready
01-13-2012, 04:28 AM
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.
TheLastSuperman
01-13-2012, 04:58 AM
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 :cool:.
Fready
01-13-2012, 05:11 AM
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?
TheLastSuperman
01-13-2012, 05:48 AM
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 ;).
Fready
01-13-2012, 06:32 AM
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 1326447114 at 1326447114 ---------------
_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?
ForceHSS
01-13-2012, 08:39 AM
read pm i sent you
Fready
01-13-2012, 01:12 PM
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.
ForceHSS
01-13-2012, 02:18 PM
ok happy to help if you want a full list of what folders to put it in pm me
Fready
01-13-2012, 02:30 PM
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
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.