How to setup MAS with your website or application

To begin using MAS you will need to have an  account. After your MAS account is setup, you can then begin to connect MAS to your website or application. 

Step 1 - Create a new configuration

Click on "Configurations" in the top menu and then click on the gold "Create a configuration" button. Follow these steps to complete the form:

  1. Select "Static content"
  2. Give your configuration a name using no spaces and a maximum of 8 characters.
  3. The Object TTL is the amount of time you want MAS to store files in cache, measured in seconds. MAS currently does not support assigning TTL on a per object basis.
  4. You can then choose whether or not to use your own domain to serve files to your end users. If you want to use your own domain then you will need to create a CNAME record in your domain's DNS settings which points to the MAS configuration subdomain which will be created for you after completing the form.
  5. You can then choose how you want MAS to serve files from the cache:
    • No SSL (HTTP Only) - files will be served over regular HTTP.
    • Optional SSL (HTTP and HTTP+SPDY) - files will be served over HTTP or HTTPS (using SPDY) depending on whether you prefix the URLs in your application with "http://" or "https://".
    • Mandatory (HTTP+SPDY) - files will be served over HTTPS (using SPDY) only. If you select this option then you must prefix the URLs in your application with "https://".
    Optional: If you would like to use your own domain name to serve your cached files, then you will need to input your domain name in the optional field on the Add Domain overlay.

Step 2 - Add origin(s)

Origins are the locations of your static files which you are wanting MAS to cache. Each domain can be associated with one or more origins. Your origin can be any IP address or domain running HTTP or HTTPS such as your own server, Softlayer's Object Storage, or Amazon S3. To add a new origin, go to the configuration you want to add an origin to, click "Origins" in the left menu and click the gold "Add new origin" button. 

Step 3 - Update URLs in your application

If you would like to use the MAS subdomain which was generated for you step 1 then simply update all URLs in your application which are used to serve static files. Alternatively if you would like to use your own subdomain such as "http://cdn.mywebsite.com" then you will need to create a CNAME record in your domain's DNS settings which points your desired domain to the subdomain which was created in Step 1. Using the example in Step 1 you would create a CNAME record which points "cdn.mywebsite.com" to "mywebsite-customerID.griffinmas.com".

DONE!

Once you have completed the above 3 steps your configuration is now complete. 

You should be able to clear your browser cache and refresh your website, which will now be using MAS to serve all static content. If you created a CNAME record in your domain's DNS settings then please wait for the DNS changes associated with your new CNAME record to be propagated.

Still need help? Contact Us Contact Us