Protecting forum parts by htaccess
I just found a thread about protecting Admin Panel via htaccess. It is usable and +1 for the author, but... The thing is, it supports only one login which need to be shared, if you have more admins, or, you want to protect Moderator panel too and have more than one moderator. So after every staff change, you need to change your pass and tell everybody, there is a new password. Second thing, you need to edit existing vbulletin files, so, you probably need to edit them over and over again after every vBulletin update. AND the third thing, that password are plain-text stored, which is not good at all.
Once again, i dont want insult that thread author, but, i just want share my way, how to do it more "sophisticated" AND secure ;) 1) Create a files named .htaccess and .htpasswd (if you using Windows and get error message, create a htaccess.txt and htpasswd.txt files for now) 2) In htaccess add: Code:
AuthUserFile /*link.to.your.protected.dir*/.htpasswd 2a) Create a new file and add code:3) Now you need to set up some usernames nad hashed passwords. I recomanded THIS page. It rly helps you. Just insert your username and password (that name and pass, what you want to use for protecting your files) and click on "Create Password". So for example we use username Anton and passsword whiteglass and we get this: Code:
Anton:H8hXcFoiSNgtY 4) Save both files and upload them on your server. 5) Now, try to access your admincp. You shoud get a small window popped up. If not, you did something wrong and you need to start over. BTW: If you used htaccess.txt and htpasswd.txt names, you need to rename them after upload. The correct names are .htaccess and .htpasswd WITH that DOT on start! Dont forget to delete that info.php file ;) Hope it helps Yea, and sorry for my english, i'm from Czech republic ;) Holy |
If you already using the second way, make sure you revert your index files back to original vBulletin first :)
|
Thanks, this way is a little nicer then the current way I am, plus I like how the passwords are not in plain text anymore.
|
On a small side note never put .htpasswd in a place that is world readable it should go before the directory where you place your webcontent, most systems will allow this or have even a special place for it.
If your lazy like me there is a program called Deadlock that will use a database and normal htaccess and htpasswd files to grant access to it. |
nice one for users who have no access to make fire walls
|
Thanks dir
|
Nice simple article for new users like me. Anyway thanks.
|
Thank you mate, I will try this
|
I've always liked these as well:
.htaccess password protect a single File: http://webdesign.about.com/od/htacce...ord_1_file.htm .htaccess password protect a Folder: http://webdesign.about.com/od/htacce...hthtaccess.htm .htaccess authentication generator: http://www.htaccesstools.com/htaccess-authentication/ .htaccess password generator: http://www.htaccesstools.com/htpasswd-generator/ |
It is really the best protection for all website owners
Thanks a lot :) |
All times are GMT. The time now is 07:01 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|