AAs stated in another answer, there is no built-in way to make nginx do this. A possible solution is to use a load-balancing setup consisting of your current server, and a backup server that does the following for all requests:
- poll your current server until it's back online
- then respond with a 302 or other redirect so the browser tries again
This server would be marked with the 'backup' flag so that it's only tried when all other servers are offline (HTTP Load Balancing > Server Weights).