Did you put Options Indexes FollowSymLinks Includes at the top of your htaccess file?
A 500 error after you've added/changed an htaccess file usually means the error is in the htaccess file, do you have access to error logs that could give you some more information on what is going wrong? Do you have anything else in your htaccess file?
Definitely agreeing with Spook...your passwd file should be ABOVE your root directory (it looks like /var/www/ is your root, which is equivalent to yoursite.c.om).
As far as logfiles, your host may have them setup in a certain way, or accessible from some type of control panel... Although it looks like your log files MAY be in /var/log/ or /var/logfiles. However, that isn't a guarantee...and if there are multiple sites on that one machine, more than likely the logfiles will always be located out of individual local virtual directories.
As for your htaccess, nothing seems to be wrong with it. Provided that the path to your htpasswd is valid and does have read privileges, than both htaccess and htpasswd have been setup and uploaded as ASCII (no wierd LFs). And technically, your error document block should be just below the OPTIONS text, and before the authorization...Also, some hosts are odd, try removing the OPTIONS line completely and see what happens.
my host is the company I work for. I don't imagine that htaccess is disabled. I mean, I set it up myself (that could very well be the problem right there), and it works fine withought those lines about the Error Documents.
whatever... maybe I'll just mess around with some stuff, and hopefully get something right.
OK, I've been busy with other things the past little while, so haven't had a chance to continue looking into this problem until now.
I just took a look at my error logs, and this is what it says:
[alert] [client 18.104.22.168] /var/www/html/temp/book/.htaccess: ErrorDocument not allowed here
any ide what this means?
In addition to that, I figured it might be useful if you all knew exactly what error message I get on the site
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Ok, ErrorDocument not allowed here usually means an override problem...
This means something in the server's configurations is overriding what you are trying to do...
You can using this in your htaccess, instead:
ErrorDocument 404 /error.php?code=404
This basically tells the server to take it's configurations and lose them, because you are in charge (insert evil laugh). (You can change the first Directory to just be <Directory /> to globally override the settings.)
Or if you have access to access.conf on apache, you can search for AllowOverride None and change it to AllowOverride All (but note that you should only do this if NONE of your htaccess is working no matter what you do).
Remember that you are messing with server settings, you could be compromising configurations on the box, so you might want to get permission before doing this, or just ask the admin to change the access.conf to override all.
Ok, well... when I saw that I was super excited, cause I was sure it was going to work. But alas, I still get the exact same thing.
I was wondering... does AllowOverride have some different options? or is it just "All or None"? And where is the access.conf file located? I'd like to take a look at it, I assume I could just access it like a text file.
Are you sure the file is named .htaccess and nothing else? That it doesn't have any weird LF or EL characters from Windows (remember, this is Apache and *nix). Was the file uploaded as ASCII, does it have atleast permissions of 644, and have you tried it with 755? Have you tried removing the Options Indexes FollowSymLinks Includes, considering that your box seems to be more tweaked than normal, you may not need that declaration. Are you sure you have the right path to your htpasswd file (and the same questions about naming, chmod, LF, ASCII, etc.)? Have you tried using your htaccess to JUST do error redirection without anything else (and vice versa with your password, since the box doesn't seem to be listening to your commands, it means certain directives could be disabled).
Do you even know if your box supports htaccess at all? It is possible that htaccess files have been disabled in entirety, not just certain directives...
I know that htaccess definately is enabled. It appears with a login box whenever you try to access anything inside /var/www/html/temp/book. This is pretty much all I want, it's just that if the user hits cancel, or gets three trys wrong, they get an ugly 401 error which I'd like to fix up.
Are you sure the file is named .htaccess and nothing else? That it doesn't have any weird LF or EL characters from Windows (remember, this is Apache and *nix).
Yes, the file is named .htaccess (when I go "ls -l" I see it there). As for the LF or EL characters, I dont know what those are... but I doubt that it has them. You see, I have access to the whole server, and have been connecting via SSH to make my changes. The .htaccess, and .htpasswd files were not uploaded at all. I created them right on the server in the directories I wanted them in. This doesn't involve windows at all. So I don't see how it could have those characters
I'm not sure about the permissions you talk about. 644? 755? what do these numbers represent? (this may be where I'm having my problems)
I've tried it both with and without Options Indexes FollowSymLinks Includes, but it doesn't seem to effect it either way.
Hopefully you can see something now, that could be causeing the problems.
I saw the other post asking about CHMOD'ing. I at least have an idea now what it is and how to use it. I typed chmod a=rx .htaccess in my temp/book directory (where I have my htaccess file). I assume you would only need read, and execute for this situation (if you even need both of them. Maybe I just need read or something).
I got no indication that the command worked, but there was also no error saying that it DIDN'T work.
I still get the same problem 500 error though. So I doubt if this is what caused the problem anyway