Is there an easy way to redirect 503?



I am trying to have nice error pages for our 503. So far what I found was using synthetic, but it requires to put the entire html content there, which seems very messy to put in the VCL (the HTML I want to put is around 100 lines).
Another option would be to put the specific page in S3, and just make it called when there is a 503.
Any suggestions?
How do people handle those 503 when having large html content these days?



@Maryyy it’s likely possible to build some complex logic to reroute a 503 to a S3-powered page like you suggest, but if the main problem is file bloat, you may just want to use Varnish’s include process for managing multiple files.

In short, you can isolate the 503 code into one file, the use the line include <filename> to have the 503 page generate in place of the line at final compile time. That way, the end VCL going to the cache nodes will look the same, but the 503 page will be separated from the rest of the VCL configuration logic