Fallback copy
A status page on your own server goes down with that server, at the moment people need it most. Since 1.2.2 Pharos can keep a static copy of every published status page somewhere else, so visitors can still read the last state while the server is unreachable.
Switch it on
- Add an S3 or SFTP destination under Scheduler and backups, as for remote backups. Use a separate one: the destination chosen here gets no backups any more.
- Open Settings → General. Under Fallback copy, tick Keep a copy of the public page elsewhere, choose the destination under Where and press Save settings.
From then on the scheduler checks every minute. When what a page says has changed, it saves that page as one
HTML file at the destination: index.html for the default page and status/{slug}/index.html
for the others. The file holds its own styles and images and has no scripts, no forms and no cookies, so it needs
nothing from this server. A line at the top says Saved copy · <time> · this server may be unreachable,
and it carries a noindex tag so search engines keep the real page. Links in it, such as those to
incidents, still point at the real site. The card shows the last copy, its size, and the last error if there was one.
To upload every page now, also the unchanged ones:
php artisan pharos:fallback-copy --force
- When this is your only backup destination, choosing it for the copy means no backups go anywhere. The settings screen warns you. Choose no destination to let backups go there again.
- Copies of pages that are unpublished later stay at the destination until you remove them.
Serve the copy
- S3: the files are written private, with
Cache-Control: max-age=60. Turn the bucket into a website withindex.htmlas its index document, and allow public reads of those files with a bucket policy. Leave the folder prefix of the destination empty, or serve that folder. On Amazon S3 a website reached through your own host name needs a bucket named after it, such asstatus.example.com. - SFTP: the files are readable for everyone on that server, so another web server there can serve the remote directory as its document root.
Open the copy at its own address now and then, so you know it works before you need it.
When the server is down
Point the status host name at the copy until the server is back: change the DNS record to the bucket website or the other web server, or switch the origin in your CDN. With a short TTL on that record, or a record that Cloudflare proxies, the change reaches visitors within minutes. Switch back when the server answers again; the live page then takes over, and the copy is updated again within a minute of the next change.