How to deploy the Dynamic and Static File Optimization template

The Dynamic and Static File Optimization template contains standard cache policies and settings to improve the delivery and performance of static and dynamic content, as well as images, based on the file extension of the requested content. Additionally, it also enables image processing and optimization. This way, you can deliver your content using Azion as a CDN.

By deploying this template, the platform creates a new edge application including all the caching rules and settings. Afterward, you can link your origin with the Azion application to start using this set of rules with your content and deliver it on the edge.


Requirements

To use this template, you must activate:


You need to enable these modules via Azion Console. To do so:

  1. Access Console > Account menu.
  2. Select the Billing & Subscriptions option.
  3. Select the Subscriptions tab.
  4. Activate the switch for each module.

Deploying the template

You can obtain and configure your template through the Azion Console. To easily deploy it at the edge, click the button below.

Deploy

Setting up the template

In the configuration form, you must provide the information to configure your application. Fill in the presented fields.

Fields identified with an asterisk are mandatory.

  • Application Name *: the name of your edge application on Azion.
    • Use a unique and easy-to-remember name. If the name has already been used, the platform returns an error message.
  • Origin Address *: the address of the hosted origin the edge application should fetch the original content from.
    • Example: www.yourwebsite.com
  • Custom Host Header: in some cases, it may be necessary to override the value of the Host header request in the request to retrieve information from the origin. Set a value for the Host header in this field.
    • Use the ${host} variable to retrieve the Host value from the request URI. Read more about the Host Header and how to customize it on the Origins documentation.

After completing all the information, click the *Deploy button, located in the bottom-right corner. This will start the deployment process.

During the deployment, you can follow the process through a window showing off the logs. When it’s complete, the deployment page appears, confirming the edge application has been successfully created.

This page shows information about the application and some options to continue your journey.

Now you can manage and adjust the settings through Azion Console.

Rules and settings

The deployed edge application includes the following rules and settings:

  • Criteria: if ${uri} starts with /.
  • Behavior: then Set Origin as Default Origin.
  • For image optimization and caching, the file extensions that can be enhanced with these configurations are .jpg, .jpeg, .bmp, .ico, .gif, .png.
  • For static content, the template supports the common static file extensions.
  • Additionally, the template:
    • Respects the origin’s cache settings (or uses a default TTL for cache).
    • Provides rules that alter caching settings for static files based on the file extension of the requested content to improve the delivery.

Managing the template

Considering that this initial setup may not be optimal for your specific edge application, all settings can be customized any time you need through Azion Console.

To manage and edit your edge application’s settings, proceed as follows:

  1. Access Azion Console > Edge Application.
  • You’ll be redirected to the Edge Application page. It lists all the edge applications you’ve created.
  1. Select the edge application related to this template.
  • The list is organized alphabetically. You can also use the search bar located in the upper-left corner of the list; currently, it filters only by Application Name.

After selecting the edge application you’ll work on, you’ll be directed to a page containing all the settings you can configure.

Adding a custom domain

The edge application created during the deployment has an assigned Azion domain to make it accessible through the browser. The domain has the following format: xxxxxxxxxx.map.azionedge.net/. However, you can add a custom domain for users to access your edge application through it.

Go to configuring a domain guide

Learn how to deploy the Dynamic and Static File Optimization template. Watch the video below:


Contributors