0
Is there a specific name for the data format used by Nginx? For example:
upstream app1_upstream {
server app1:80;
}
server {
listen 80;
server_name app1.example.com;
location / {
proxy_pass http://app1_upstream;
}
}
This file looks a lot like a guy JSON
, most obviously it is not.
In reality this type of configuration file is called vhost and is only a code interpreted by Nginx. The mounting structure of this file belongs only to Nginx is an emulated code inside a native interpreter. I’ve never heard of it having a specific name.
– Rafael Salomão
I wanted to mount something that creates this type of file to use as a reverse proxy on servers with Docker, and I wanted to avoid having to concatenate millions of string, I imagined that if this type of format was a standard would have something already ready to manipulate it
– Antonio
Couldn’t use json? The syntax is really close to a json with regular expression
– Rafael Salomão
So, I wanted to build the Nginx configuration file using python for example, with information obtained from the Docker sdk, can you tell me if Nginx accepts configuration in json comun?
– Antonio
In all the years I’ve been working with servers I’ve never heard of accepting have you looked at the Nginx documentation? Maybe you can assemble an interpreter.
– Rafael Salomão