For experimentation or testing (manual or automated, if automated usually captured by vcr), I sometimes need a URL guaranteed to always return an HTTP 500 error response.
Here’s some configuration you can drop in an apache conf to generate a simple default 500:
Redirect 500 /error500
Accessing http://yourserver/error500, or /error500/more/path, or /error500/more/path?with=query, all will return a 500 response with apache’s default 500 body.
The command is ‘Redirect’ becuase this is normally used to generate a redirect with “Location” header, so you can use it for mocking any 3xx with Location too (third argument, if present, value of Location header), but it also works fine for mocking up other status codes like 500 or anything else, so long as you don’t care too much about what the body looks like.