Contact
Site: US UK AU |

How to install the Nexcess CDN with ExpressionEngine

How to install the Nexcess CDN with ExpressionEngine

Overview
This article describes how to configure your Nexcess CDN with your ExpressionEngine service.

Prerequisites

Procedure

This procedure consists of the five steps below.

1: Configure customer origin: HTTP Small Platform

Configure the HTTP Small delivery platform as instructed in How to configure a CDN customer origin server.

Attention: Choosing the wrong platform for the type of content that you would like to serve can cause problems for your website. Therefore, it is very important that you select the correct platform for the type of content that you would like to serve.

After configuring your customer origin, it will take approximately one hour for the changes to be pushed to all CDN locations. Once propagation is complete, you can use the new CDN URL to access your content over the CDN.

2: Create a user-friendly CDN (CNAME) URL

You can choose to customize the CDN URL to be a simpler and more user-friendly name by configuring the CNAME file for your domain. Follow the steps in How to create a CNAME URL with Edgecast CDN.

If you do not want to configure the CNAME files, use the full URL that was provided after you configured your origin server in the HTTP Small procedure.

3: Set up the .>htaccess file 

  1. Add the following code to the ExpressionEngine's site root .>htaccess file:
<FilesMatch "\.(gif|png|jpg|jpeg|css|js)$">
ExpiresActive On
ExpiresDefault "access plus 1 week"
FileETag none
</FilesMatch>
The code above sets the expiration for the headers correctly so that browsers cache the files once downloaded from the CDN.
RewriteCond %{REQUEST_FILENAME} \.(gif|png|jpg|jpeg|css|js)$ [NC]
RewriteCond %{HTTP:X-Host} !.*nexcesscdn\.net$ [NC]
RewriteRule ^(.*)$ http://wpc.a64f.edgecastcdn.net/80xxx/images/$1 [L,R=301]
  • The first rewrite condition matches any images, CSS, or javascript being downloaded.
  • The second rewrite condition makes sure the request is not from EdgeCast. The second rewrite rule ensures that content is pulled locally.
  • The rewrite rule 301 redirects the request to the customer origin or CNAME URL. The URL shown is the URL provided by EdgeCast.

4: Purge the CDN cache

Follow the instructions provided in How to purge CDN cache.

5: Activate CDN compression

Follow the instructions provided in How to activate CDN compression.

Troubleshooting

If any elements on your site appear to be missing, it could be due to one of the following:

  • The CDN has not fully cached all of your website's content. It takes approximately one hour for the CDN to cache content. Also, any time cache is flushed, it will take approximately one hour to re-cache.
  • The CDN configuration settings are not properly defined. Follow the steps provided in this article to verify that you have entered the correct settings.

 

For 24-hour assistance any day of the year, contact our Support Team by email or through the Client Portal.

Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
How to purge the CDN cache
Added on Wed, May 23, 2018
How to configure a CDN customer origin server
Added on Tue, May 22, 2018
How to secure your ExpressionEngine website
Added on Tue, Dec 9, 2014
How to configure EdgeCast CDN with a non-standard TLD
Added on Tue, Feb 18, 2014
What is ExpressionEngine?
Added on Wed, Sep 11, 2013
How to configure ExpressionEngine permissions and ownership
Added on Tue, Nov 11, 2014
How to purchase Nexcess shared hosting plans
Added on Mon, Jan 4, 2016
How to configure a generic Nexcess CDN
Added on Tue, Sep 10, 2013
How to access your CDN from the Client Portal
Added on Mon, Jun 4, 2018