Product

Product Features How to Compare Docs Screenshots Why

Start here

Getting started Download Guides Frequently asked questions

More

Security Support Roadmap About

Migrating in

6 answers

Bringing an existing nginx setup across.

Looking for something specific

The searchable index covers all 326 answers at once and filters as you type.

311 Import my existing nginx configuration
  1. Traffic, Import.
  2. Paste the file your sites are actually in, usually from sites-enabled or conf.d. A top level nginx.conf is normally just a list of includes and shows you almost nothing.
  3. Press See what it would make. This writes nothing at all.
  4. Read the Left alone section properly, untick anything you do not want, then import.
cat /etc/nginx/sites-enabled/*

Everything arrives switched off and unapplied, so you can look it over before turning it on.

importmigrateexisting nginxpaste config
312 Why did the import not bring my certificates?

Your configuration names certificate files by path. Those paths point at files on the machine the configuration came from, and the private keys are not in the text you pasted anyway.

So a site comes across knowing it uses https and with no certificate chosen. Afterwards, either get a new one from Let's Encrypt or upload the existing certificate and key.

certificatesnot importedexpectedhttps
313 The import made one site out of my two server blocks

Correct. You had two blocks for one name, one of which only forwarded to the other. That is one site here with the force https switch turned on, not two sites. The note under the site says exactly that.

two blocksredirect blockmergedforce https
314 The import says an upstream was never defined

Your configuration pointed at a pool declared in a file you did not paste. Paste that file too and preview again. Order does not matter, so you can paste several files one after another into the same box.

upstream missingundefinedseveral files
315 Move from HAProxy or Apache

The importer reads nginx configuration only. Coming from something else means building the sites and pools by hand, which for a handful of sites is an afternoon. Start with one site, get it working end to end, then repeat.

haproxyapachenot supportedmanual
316 Cut over from an old load balancer without downtime
  1. Build the new fleet and configure the sites, but do not point any DNS at it.
  2. Test by adding the new addresses to your own hosts file, or by asking the new node directly with curl and a Host header.
  3. Get certificates on the new fleet using dns-01, so you do not have to move traffic first.
  4. Lower the TTL on the names you are moving, well in advance.
  5. Move one name at a time and watch it.
curl -sk -H "Host: shop.example.com" https://203.0.113.10/ -o /dev/null -w "%{http_code}\n"
cutovermigrationno downtimetestinghosts file

Two fresh servers is all it takes

Ubuntu 22.04 or newer, root access, and about twenty minutes. The installer does the rest and it is safe to run twice.