My .htaccess file produces a 500 internal server error.
File:
AuthType Basic
AuthName "Fret Rolland"
AuthUserFile /home/orbitppc/public_html/merch/.htpasswd
Require valid-user
SetEnv RUNTIME_ENVIRONMENT "production"
After some debugging I have concluded that the error is here SetEnv RUNTIME_ENVIRONMENT "production" I do not understand what I did wrong here and why is this causing an error. Any advice about what the issue might be? Thank you for all your help!
Related
my website keep getting the 404 error and I don't know what's causing it but I narrowed it down to the .htaccess document.
here is the bad .htdaccess doc
AuthType ****
AuthName "******"
AuthUserFile /******/****
Require user *******
and this the working doc
AuthType ****
AuthName "******"
AuthUserFile /******/****
Require user ******
DirectoryIndex *******
I don't know what keeps deleting the "DirectoryIndex *******" line. I know it's not me.
any ideas on what it could be?
need a help with .htacces file to make http authentication.
I made .htacces and .htpasswd files due to tutorial on some web page, but it doesn't work.
.htacces file is very simple
AuthType Basic
AuthName "xxx"
AuthUserFile my/directory/path/
Require valid-user
Path is right, I checked it. Does anyone know what can be wrong please? Maybe there's something on ubuntu I should change or something.Thanks
I have the following code to protect my application:
.htaccess:
AuthType Basic
AuthName "My Protected Area"
AuthUserFile .htpasswd
Require valid-user
.htpasswd:
username:$apr1$Am/5PMEt$JofEYwKBM8rhEnsoLndir/
The .htpasswd file is in the same directory as the .htaccess file.
It does ask me for authentication, but then gives me a 500 server error. I just used this tool, so I am wondering what I might be doing wrong?
Thanks!
Try changing the .htpasswd to use the full path starting from / and using this tool instead: http://www.askapache.com/online-tools/htpasswd-generator/
AuthType Basic
AuthName "My Protected Area"
AuthUserFile /var/www/public_html/full/path/to/.htpasswd
Require valid-user
Satisfy All
Otherwise it sounds like the error is being caused by some other issue. Likely 1 of 2:
The permissions on the .htaccess or .htpasswd file are bad
There is some other error like a rewrite or something in a .htaccess or php error
You need to cause this error to happen again, and then view your /var/log/httpd/error_log file (or named something similar) which will tell you the reason for the 500 error.
Hi I have the following in a .htaccess file:
AuthType Basic
AuthName "restricted area"
AuthUserFile /web/clients/.htpasswd
require valid-user
this works in making the directory private, however I get a 403 error and no password/user pop up appears to even give me the chance? Any ideas as to what I am doing wrong, both htaccess and htpasswd are together in the directory I want to protect.
Thanks
This is my htaccess file in the directory /home/domain.nl/public_html/helpdesk
Require user agent8 agent9 agent10
AuthType Basic
AuthName this_protected_area
AuthUserFile /home/domain.nl/public_html/.htpasswd
But when I go to domain.nl/helpdesk I got a 324 error (ERR_EMPTY_RESPONSE). So whats wrong? I'm sure the htpasswd file is on the correct location.
In the error logs I see this error:
(13)Permission denied: Couldn't read /home/domain.nl/public_html/errors/.htaccess, closing connection.
Try changing your .htaccess with this:
Require valid-user
AuthType Basic
AuthName this_protected_area
AuthUserFile /home/domain.nl/public_html/.htpasswd
Make sure .htaccess is enabled and if that doesn't work pls copy/paste relevant section of your error.log file in your question.
I renamed the public_html/errors/ dirrectory to errors2 and its working now. Thanks for helping!