deansaddigh Posted September 4, 2010 Share Posted September 4, 2010 im trying to make .htpasswd files. but i dont know how to get what the directory is called above htdocs, as its meant to be kept outside root, can anyone help ive included a pic [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/212546-whats-the-directory-above-htdocs/ Share on other sites More sharing options...
wildteen88 Posted September 4, 2010 Share Posted September 4, 2010 Where have you placed the .htpasswd file? I guess the most likely place would to put it in the private folder? If its in the private folder, and you're going to be calling the .htpasswd file from a .htaccess file within the htdocs/ folder, then you'd reference the file using ../private/.htpasswd ../ means to go one level higher in the directory tree. Quote Link to comment https://forums.phpfreaks.com/topic/212546-whats-the-directory-above-htdocs/#findComment-1107332 Share on other sites More sharing options...
deansaddigh Posted September 4, 2010 Author Share Posted September 4, 2010 Thanks again wildeteen, you have been really helpful to me, and i really appreciate it . Kind Regards Dean Quote Link to comment https://forums.phpfreaks.com/topic/212546-whats-the-directory-above-htdocs/#findComment-1107351 Share on other sites More sharing options...
deansaddigh Posted September 4, 2010 Author Share Posted September 4, 2010 Does this look correct to you, because im getting a 500 error faster than lightining. htacess AuthName "Restricted Area" AuthType Basic AuthUserFile ../private/.htpasswd AuthGroupFile /dev/null <Files phpmyadmin> require valid-user </Files> <Files admin> require valid-user </Files> Quote Link to comment https://forums.phpfreaks.com/topic/212546-whats-the-directory-above-htdocs/#findComment-1107353 Share on other sites More sharing options...
steviewdr Posted September 5, 2010 Share Posted September 5, 2010 AuthUserFile needs to be a full path on the server. I.E. /home/user/private/.htpasswd To find the full folder path, create the following file: phpinfo.php with the following: <?php echo phpinfo(); ?> Put this folder in the htdocs folder and go to the file via your web browser and look for the full path. Then when you know the full server path put this in your .htaccess file. -steve Quote Link to comment https://forums.phpfreaks.com/topic/212546-whats-the-directory-above-htdocs/#findComment-1107533 Share on other sites More sharing options...
deansaddigh Posted September 5, 2010 Author Share Posted September 5, 2010 thanks very much man. Quote Link to comment https://forums.phpfreaks.com/topic/212546-whats-the-directory-above-htdocs/#findComment-1107596 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.