My intention:
I would like to override default configuration defined in /etc/nginx/nginx.conf
(in debian 8).
The idea is to keep this file completely untouched to ease future system updates and be able to get the latest changes for the options I did not override.
What I did:
I created a custom configuration in the /etc/nginx/conf.d/
the same way I did for several other debian services.
Problem: However, it seems impossible to override some configuration, because I get a "X" directive is duplicate error. Nginx does not seems to support configuration override the same way other services does.
Question:
Is there a way to override and add new option to the nginx http context without getting the directive is duplicate error? Or should I completely abandon the idea and rampage the nginx.conf
?
Many thanks for your help.
This similar question does not really solve my problem, because I also want to profit from default options nginx set automatically for me (e.g. worker_processes auto;
)