Favicons have become more and more unruly. To cater for all browsers/platforms I am using this excellent service. What I get is the following files:
android-chrome-192x192.png favicon-16x16.png mstile-150x150.png
android-chrome-512x512.png favicon-32x32.png safari-pinned-tab.svg
apple-touch-icon.png favicon.ico
browserconfig.xml manifest.json
The recommended path for these is the web root as some browsers do not honor custom paths. I really don't want to have such a mess in my web root. So, I am looking for a location
configuration to place them all in their dedicated directory while letting the clients think they are in the web root.
I have seen exact match rules like this:
location = /favicon.ico {
root /var/www/path/to/favicons;
}
But 10 exact match locations just for these files is not a very good solution. What else can I do?
include
it