0

I tried to create the .htaccess and the .htpasswd whith sulbime text 2, then notepad++, notepad with different encoding and rename my file in filezilla but I still get an Internal server error. I get my path with the line

Here my .htaccess

AuthName "preprod"
AuthType Basic
AuthUserFile "/home/site/preprod/.htpasswd"
Require valid-user

Here my .htpasswd

dev:tJqh/oQHViefU

I have no idea how to resolve it .. My host is OVH

  • 1
    check your apache error.log – anubhava Jul 06 '14 at 17:13
  • I haven't any log file on my ftp :/ I don't know where OVH put it – user3264208 Jul 06 '14 at 17:22
  • Ok i find them and it always says : [Sun Jul 06 18:05:52 2014] [error] [client 212.198.228.133] [host preprod.mysite.fr] (2)No such file or directory: Could not open password file: /home/mysite/preprod/.htpasswd Or this: [Sun Jul 06 18:15:50 2014] [error] [client 212.198.227.133] [host preprod.mysite.fr] (2)No such file or directory: Could not open password file: /usr/local/apache2/.htpasswd I don't understant why the my path seems not good. :o How to get it ? – user3264208 Jul 06 '14 at 17:36
  • That means your password file is either not having correct path or wrong permissions. – anubhava Jul 06 '14 at 17:43

1 Answers1

0

download a sample file of .htaccess and .htpasswd, and put your code on it and upload it to you webroot. some times you rename a text file with another file extension, it changes file's name only not the extension or file type.

ashish.negi
  • 502
  • 3
  • 7