Skip to main content
Moving to DNZ starts from what already runs. dnz proxy import nginx reads an Nginx configuration and writes a proxy YAML file. Nothing is applied: the file goes through dnz proxy plan and dnz proxy apply like any other, and what didn’t map is named with its file and line, never guessed at and never dropped without a word. The configuration is only read as text. Nothing in it runs, and include looks only among the files you give.

On the command line

It needs no server: the files stay on your machine until you plan them. What wasn’t imported is listed at the top of the YAML as comments, so it travels with the file.

In the dashboard

Proxy → Proxies → Add proxy → Import its configuration: paste a file or choose files (nginx.conf and what it includes), and pick the proxy it goes to. You see the plan and what wasn’t imported side by side, and Apply applies the plan. The text is read once and never stored or logged.

What maps

Nginx’s inheritance is followed: add_header, proxy_set_header, allow/deny and limit_req written in a location replace those from the server and http above it, as they do in Nginx. Without proxy_ssl_verify on, Nginx doesn’t check an HTTPS server’s certificate, so the server gets skip_tls_verify: true.

What doesn’t

Named with its file and line: if, map, geo, set, Lua, regular expression locations that aren’t a plain path, named locations, a variable in proxy_pass or in a header’s value, fastcgi_pass and the other non-HTTP upstreams, serving files (root, try_files), backup servers, stream, timeouts and proxy_ssl_*. Settings of the whole server (worker_processes, logs, gzip, TLS versions, MIME types) are listed apart, since they have no place in a route.
A route whose protection can’t be carried over comes out switched off (enabled: false): a password file not given, an address list it can’t read, auth_request, satisfy, an if or limit_except that may guard the site. Applying the file can’t open a site that was closed. Fix what is named, then turn it on.
  • Certificates aren’t copied. Their paths are listed, and the hostnames go to DNZ’s automatic certificates.
  • client_max_body_size is for every body in Nginx; a route’s upload limit is for multipart uploads.
  • *.example.com covers one label on a route, and any number in Nginx.
  • A regular expression location beats a longer prefix in Nginx, and routes rank by length. Check the plan when such a location overlapped others.
  • Another port than 80 or 443: the route takes the proxy’s usual entry point, and the line is named. Put the right one in the route’s entry_points.

For an assistant

proxy_config_import_nginx gives an assistant the YAML with the leftovers at its top, and proxy_config_plan shows what it would change. Neither applies it: that is for people.