Help - Search - Members - Calendar
Full Version: Apache Custom error doc problem
Neowin Forums > *nix Customization & Support > Linux Server/BSD/Unix
zer0day
RESOLVED thanks to DaveLegg wub.gif. The problem was it was trying to access the document in a folder that had a bad rewrite directive (that I was using for testing) and it meant the server couldn't get to the 500.html file. pinch.gif


------------------------------------------------------------------

I have a number of custom documents for 404, 403, etc, but it turns out for some reason, apache can't find the 500 error document and it affects all my vhosts. I was setting up some error docs today, and when it came to testing the if the 500 error doc was working, it gave me the standard apache internal server error message followed by:

Quote -
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.


I had my syntax checked by people in freenode/#apache on irc, they said its fine, and they can't see what the problem is. All the error docs have the same permissions and are owned by the same user.

This is what my typical vhost entry looks like:

CODE
<VirtualHost 69.93.127.152:80>
    ServerName zer0day.com
    ServerAlias www.zer0day.com
    DocumentRoot /wwwroot/htdocs/zer0day
    ErrorLog "logs/zer0day-error_log"
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" com$
    CustomLog logs/zer0day-access_log "combined"

   ErrorDocument 404 /404.html
   ErrorDocument 403 /403.html
   ErrorDocument 401 /401.html
   ErrorDocument 500 /500.html

</VirtualHost>


I can't work out why the 500 doc doesn't work when all the others do, I can access it fine if I go directly to the doc via my web browser. confused.gif
DaveLegg
Quote - (zer0day @ Feb 25 2008, 19:40) *
RESOLVED thanks to DaveLegg wub.gif. The problem was it was trying to access the document in a folder that had a bad rewrite directive (that I was using for testing) and it meant the server couldn't get to the 500.html file. pinch.gif


*Takes a bow*
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.