N
N
Nadya19962017-07-04 12:33:49
Nginx
Nadya1996, 2017-07-04 12:33:49

Can a local nginx server only have one config?

Interested in how many configs the local server should have. Since the mana for setting up nginx indicates that you need to create a config and enter server blocks into it. However, as I understand it, the finished config already exists and is located in the /etc/ngind/conf.d/default.conf directory. It contains the default settings. However, when checking the config for errors in the terminal, the message invalid number of argument in "server tokens" is displayed. The server_tokens variable itself contains the Off value, and nothing is said about it in the configuration guide for beginners. I understand that its value will be numeric and what is it connected with?
Just like the server is still running, it loads the welcome page, but when you reboot through the terminal, a config error pops up, although nothing has changed in it.
If you add a location to the config in the server block with a link to an existing directory, then on reboot you get the answer that the config was not found (it does not see the configuration file). It does not matter how to make blocks either in default.conf, or create another one next to it, it still does not see. However, if you remove the block from the default and leave it as it was, then we see it, but it loads with a token error. The second config is not visible.
OS linux mint 18.1, as I understand it, is similar to ubuntu 16.04.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2017-07-04
@sim3x

One config is in /etc/nginx/nginx.conf
It includes configs for domains that are in the conf.d directory
nginx.org/en/docs/http/ngx_http_core_module.html#s...
You changed something fun in configs
Add them to the question

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question