(Number 1 in an occasional series)
It's counter-intuitive if a 500 error makes your web server direct to a non-existant domain
ErrorDocument 500 http://foo.example.com/cgi-bin/tester
That had me puzzled for a while. The main page of the site is index.cgi and it kept trying to redirect me to foo.example.com.
I wasted time checking for mod_rewrite rules before simply searching http.conf for a string containing the bogus server address.