nginx config viewer
Drop nginx.conf or a site’s config to see its servers and locations, what each directive does, and mistakes nginx would refuse. Your browser opens it on your device: nothing is uploaded.
What you see
| nginx config in the viewer | What it does |
|---|---|
| At a glance | Each server’s names and ports, and where its locations send requests |
| Checked | A missing ;, a } never closed or never opened, a directive nginx refuses twice in one block, TLS 1.0 and 1.1, autoindex |
| Directives explained | With their default and a link to nginx.org |
| Extensions | .conf, .cnf, .ovpn |
| Upload | None: opened on your device |
What is an nginx config file?
nginx reads its settings from nginx.conf and the files it includes (sites-enabled, conf.d): directives ending in ; inside blocks such as http, server and location.
How to open an nginx config file
- Add your nginx config. Drop the file in the box, choose it or paste it.
- Look at it. Each server at a glance (names, ports, where requests go), the file colored with what each directive means and its default under it when you switch Explanations on, and errors nginx would refuse such as a missing ; or a } never closed.
Questions
Which location block does nginx use for a URL?
An exact = match wins outright. Otherwise nginx takes the longest matching prefix, then tries regular expressions (~ and ~*) in the order they are written; the first that matches wins, unless the prefix had ^~.
How do I check my nginx config?
Run nginx -t on the server: only nginx can say it accepts the file. This viewer finds what reading it shows, such as a missing ; and blocks never closed, before you get there.
Why does my nginx config say a directive is duplicate?
Many directives may appear only once in a block, such as root, proxy_pass and client_max_body_size. The list above the settings names both lines.
Is my file uploaded?
No. The viewer runs in your browser and opens the file on your device. Nothing is sent anywhere.
Can opening a file here damage it?
No. The viewer only reads the file: a browser gives a page no way to change it. If something goes wrong, the view stops and the file is as it was.