Question

How to modify 503 file in magento 2 cloud Enterprise edition ?

  • When a 503 error occurs it returns maintenance page.
  • I want to add some extra code for 503 Error/Maintenance page in Magento 2 cloud Enterprise edition ?

But my cloud use do not have permission to write that file.

Note : Fastly Configuration section is not available on server.

Was it helpful?

Solution

Magento 2 Enterprise Cloud comes with 3 envoirnments setup by detault Integration , Staging and Production.

In integration environment you only have 2 caching option available Bulit-in and Varnish, however in staging and production you have one more caching option Fastly CDN available. So for staging and production ( live ) you will only be using Fastly CDN ( not Built-in or Varnish ) without it Magento won't allow you to go live.

so here are the steps to setup 503 custom error page for staging and production ( customizing 503 error page for integration will not worth it as ultimately you have to switch to fastly ).

Login to admin panel and go to :

Stores > Configurations -> Advanced -> System - > Full Page Cache

Select Fastly CDN ( and configure it by provided api service id and token by magento )

click on save changes and Click on Button "Upload VCL to Fastly"

Then click on Fastly Configurations tab and Click on "Custom Synthetic Pages" and click on "Set Html" button like screen shot below :

503 Error page

After making changes click on save configurations and then on same page click "Upload VCL to Fastly"

This is how you have to setup 503 page for your live and staging site.

IMPORTANT: Always save changes first before click to Upload VCL to Fastly button. otherwise it will not work.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top