Hi everyone,
I use a control panel for the servers and with the technical support it is difficult to solve a problem that has been going on for 3 days already.
This problem only exists with them because there is a piece of code that is added to the Nginx configuration of which here is an excerpt:
========================================
...
include /etc/nginx-rc/extra.d/location.main-before.*.conf;
...
location = /favicon.ico {
log_not_found off;
}
...
include /etc/nginx-rc/extra.d/location.main.*.conf;
...
========================================
If I remove the block from the "location = /favicon.ico..." code everything works, but the problem is that this configuration file is generated automatically and will be overwritten with the next updates.
When I try to put this block of code, I get the following error message:
"nginx: [emerg] duplicate location "/favicon.ico" in /etc/nginx-rc/extra.d/DOMAIN-NAME.location.main.favicon.conf:1 nginx: configuration file /etc/nginx-rc/nginx.conf test failed "
========================================
location = /favicon.ico {
root /home/www/img/icons/DOMAIN-NAME.com;
}
========================================
We tried several block writes but nothing works.
Do you know how we can remedy this problem?
Knowing that we cannot delete or modify the initial configuration file, we can just add a new file before or after the block in question.
Is it possible to cancel the first declaration?
Is it possible to overwrite the rental with a new one?
Thanks for your help.
Edited 1 time(s). Last edit at 01/05/2022 04:54AM by bouro.