Skip to content
Article

How to Set Up Umbraco Courier in AWS EC2 behind an ELB with SSL

During a regular day at work, while working at an Umbraco 7 instance, a client asked me for an easier way to move content from development to production and vice versa. Any Umbraco user knows that any changes you make in development need to be replicated in production, unless you use a tool to do it for you. When it comes to tools, you have options: build your own tool (Umbraco gives you all the resources you need to build your own), you can use a third-party one, or you can use Umbraco Courier. I elected to use Umbraco Courier—it’s simple, £99 per site, really cost-effective, and if you meet their partner standards you get it for free.

Setting up your Umbraco Courier is pretty straightforward IF you don’t have a complicated setup for your servers. Login to Umbraco > Developer > Packages > Umbraco package Repository > Lookup for Courier > Install; answer a few questions; go to the new Courier section and login to download your license and get going. But, in this case, the configuration was not that straightforward.

Courier wasn’t accurately replicating the content that we employed it to replicate. The content wasn’t successfully transitioning through the URL rewrite rule and Courier wasn’t logging real information about the problems it was encountering. It took me working with three of their developers just to pinpoint the issue. Fixing it with our system would prove to be another challenge entirely.

Let me walk you through this client’s infrastructure setup and explain the problems I faced that required long hours and serious headaches to correct. With an understanding of that framework it will be much easier to understand how I corrected the issue.

The Root of the Issue

After installing Courier on our dev server and configuring the courier.config with my three environments (localhost, dev and prod), the first error we got was:

“Object moved”

The stack for this instance might look like this:

System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Umbraco.Courier.RepositoryProviders.WebServiceProvider.RepositoryWebservice.OpenSession(String sessionKey, String username, String password)

This was really frustrating. The logs don’t provide any real information about the problem as Courier is, apparently, very convoluted regarding licensing errors.

Important Note:

The client setup contained an ELB, which was hosting the SSL, in front of the EC2 instances for both dev and prod, and it incorporated URL Rewrite rules to enforce the http protocol.

How We Solved the Problem

To address this Courier problem check for the following in your Umbraco code:

  • Client in AWS with load balancer
  • Server where site is hosted
  • Site has an HTTP to HTTPS rewrite rule which forces client to go from an open connection to a secure one

Once you’ve confirmed this is the issue you’re dealing with, you can address it easily. First, ensure all servers that will have Courier installed are up and running. If your production server is not ready yet, then only include the servers that ARE ready to be tested in the Courier Config file. Next, modify the rewrite rule to ignore all the Umbraco routes.

Once you’ve done this, Courier should be able to replicate your content accurately across instances and you can start taking full advantage of the software’s functionality such as large uninterrupted deployments to remote instances, custom automated deployment functions, and free open-source software.

To Address Your Own Umbraco Issues

While this step-by-step should help you correct this particular issue with Umbraco, we’re always eager to hear what other problems you may be encountering. Feel free to respond via email or in the comments section to highlight the Umbraco issues you’re currently struggling to remedy.

The Atlantic BT Manifesto

The Ultimate Guide To Planning A Complex Web Project

Insights

Atlantic BT's Insights

We’re sharing the latest concepts in tech, design, and software development. Learn more about our findings.

Questions & Answers

How much does custom eCommerce cost?

A custom eCommerce store could cost anywhere from $12,000/year to millions. Variable factors include the amount of custom features, the complexity of design, setup investments, training, and maintenance. Check out how to determine the cost of a custom eCommerce store.

Learn More about How much does custom eCommerce cost?
What is the best web development framework?
Many people commonly ask “what is a framework in web development?” Web development frameworks can easily be confused with web development tools, languages, or parts of the web development stack (like .NET, PHP, JavaScript, or Ruby).
Learn More about What is the best web development framework?
What is the best programming language for web development?
If there was one “best” programming language, then everything else would be obsolete. The reality is that there are so many different programming languages because there is no “best” language for any situation.
Learn More about What is the best programming language for web development?
How much does web development cost?
Web development can vary from a few hundred to millions of dollars depending on what is needed. You may simply need some changes to something that already exists, or you'd like to build a large or complex application.
Learn More about How much does web development cost?
What is web design and development?
People often lump web design and development together, so what's the difference? As the Internet has evolved, the skills required to produce a high quality website or web application have changed.
Learn More about What is web design and development?
What is JavaScript used for in web development?
Historically speaking, JavaScript was only commonly but sparingly used in web development. The multiple browsers in use at the time each supported different versions of JavaScript and were slow to render more complex Javascript.
Learn More about What is JavaScript used for in web development?
What is React web development?
React is a popular JavaScript library. It is primarily used for building interactive user interfaces (UI).
Learn More about What is React web development?