Answer the question
In order to leave comments, you need to log in
How to collect NGINX configurations from different files?
Tell me, please, how can I implement the assembly of the config file?
There are configuration files, these files are included in the nginx.conf file, but they have duplicate locations, tell me how you can separate the duplicate locations into a separate file and connect them to nginx.
Sample nginx.conf
configuration
...
map $host{
....
}
include /path/file1.conf;
include /path/file2.conf;
include /path/file3.conf;
include /path/file4.conf;
server {
listen 127.0.0.1:80;
...
location ... {
...
}
location ... {
...
}
}
server {
listen 80;
...
location ... {
...
}
location ... {
...
}
}
server {
listen 443 ssl;
...
location ... {
...
}
location ... {
...
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question