How to assemble the configuration of NGINX with different files?

Tell me, please, how you can implement the Assembly configfile?
There is a file with the configuration, these files are connected in nginx.conf, but they have duplicate locations, tell me how to duplicate the locations in a separate file and to connect them with nginx.

Example configuration
nginx.conf
...
map $host{
....
}

include /path/file1.conf;
include /path/file2.conf;
include /path/file3.conf;
include /path/file4.conf;


file1.conf
server {
 listen 127.0.0.1:80;
...
 location ... {
...
}
 location ... {
...
}
}


file2.conf
server {
 listen 80;
...
 location ... {
...
}
 location ... {
...
}
}


file3.conf
server {
 listen 443 ssl;
...
 location ... {
...
}
 location ... {
...
}
}
June 8th 19 at 17:18
0 answer

Find more questions by tags Nginx