Jump to content

Use Of .htpasswd File


Recommended Posts

Hi I have a website which I want to test restricting access with an .htpasswd file. The setup seems simple enough - just create the file, use a password generator to populate the contents of the htpasswd file, then set up your htaccess file and you're good to go. I've done everything correct (I think), but I get 'Internal Server Error 500' on my site when I try it out. I'm thinking possibly the path to the .htpasswd is not correct?

 

What I have in .htaccess is:

 

AuthUserFile /xyz/.htpasswd

AuthType Basic

AuthName "Login Details"

Require valid-user

 

The directory /xyz is in the /public_html folder. Would this path be correct? Or is there another path I should use here? Thanks for any help.

Link to post
Share on other sites

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.   Paste as plain text instead

  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...