Find the answer to your Linux question:
Results 1 to 2 of 2
Hello, I created the .htpasswd and the .htaccess file on a live server. But it did not do anything. I placed the same files on my laptop, changed the absolute ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2010
    Posts
    27

    Can't get htpasswd to work


    Hello,

    I created the .htpasswd and the .htaccess file on a live server. But it did not do anything.

    I placed the same files on my laptop, changed the absolute path in the .htaccess file and it is working on my laptop.

    Does htpasswd have to be enabled somehow in some server setting? Do permissions make a difference?

    What should I do to diagnose such problem?

    thanks in advance for your help.

  2. #2
    Just Joined!
    Join Date
    Sep 2010
    Posts
    1
    yes, it must be permitted in server config, and .htaccess must be readable by apache daemon's user.

    If you have read access to the apache config, check:
    * AllowOverride - if it's set to None, you can't use .htaccess, if to something else - check apache manual for this directive
    * AccessFileName .htaccess - It's also possible that the admin chose a different filename to use

    If you can't read the config, place an incorrect directive in your htaccess, like:
    NonExistingDirective BlaBla
    if you get "Internal Server Error" after reloading the page, .htaccess works

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •