Welcome! Log In Create A New Profile

Advanced

Favicon.ico For A Specific Host Name

Posted by bouro 
Favicon.ico For A Specific Host Name
January 05, 2022 04:53AM
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.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 199
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready