Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2012, 04:28 AM
Fready Fready is offline
 
Join Date: Nov 2010
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default .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:
Quote:
2) Path to .htpasswd file relative to your server's root directory: (e.g. - /home/site_name/)
Or
Quote:
3) File names to protect (Optional: leave empty if protecting folder):
Separate multiple files with a comma. ie: protected.htm, protected2.htm
Or this:

Quote:
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 01-13-2012, 04:58 AM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 .
Reply With Quote
  #3  
Old 01-13-2012, 05:11 AM
Fready Fready is offline
 
Join Date: Nov 2010
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the reply,

Quote:
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?:
Quote:
Configuration File (php.ini) Path


Quote:
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 01-13-2012, 05:48 AM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 .
Reply With Quote
  #5  
Old 01-13-2012, 06:32 AM
Fready Fready is offline
 
Join Date: Nov 2010
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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:
Quote:
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 [DATE]1326447114[/DATE] at [TIME]1326447114[/TIME] ---------------

Quote:
_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:
Quote:
/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 01-13-2012, 08:39 AM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

read pm i sent you
Reply With Quote
  #7  
Old 01-13-2012, 01:12 PM
Fready Fready is offline
 
Join Date: Nov 2010
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 01-13-2012, 02:18 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok happy to help if you want a full list of what folders to put it in pm me
Reply With Quote
  #9  
Old 01-13-2012, 02:30 PM
Fready Fready is offline
 
Join Date: Nov 2010
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


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

Forum Jump


All times are GMT. The time now is 05:10 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
  • Page Generation 0.04498 seconds
  • Memory Usage 2,244KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (10)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete