Jump to content

whats the directory above htdocs


deansaddigh

Recommended Posts

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.

Link to comment
Share on other sites

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>

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.