3

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.

  • are you using Fastly for caching ? – Naveed Asim Sep 21 '18 at 6:42
  • No, Fastly is not available on server. – Aditya Shah Sep 21 '18 at 6:47
  • Well, Magento 2 Enterprise Cloud works with Fastly and it is available on their staging and production environment, without that configured magento will not let you go live. if your not working with fastly then which caching system is setup ? – Naveed Asim Sep 21 '18 at 6:52
  • Varnish and default on integration server. – Aditya Shah Sep 21 '18 at 7:13
  • @Aditiya Shah, since you are working with Magento 2 Enterprise Cloud then you have to use Fastly on staging and Production serves, and that is the only caching you will be using for your live site. i can guide you how to setup custom 503 for live site ( ultimately that will be the solution ) for integration it will not work. – Naveed Asim Sep 21 '18 at 7:20
3

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.

  • Thanks a lot for the answer !! let me try it on server. – Aditya Shah Sep 21 '18 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.