The Nginx configuration fragment included into sites (`includes/nginx_advanced_include.conf`) uses the `$host` variable in ways which are incompatible with site aliases. `$host` contains the `Host` header value, which is not necessarily the same as the name of the site directory.
location = /favicon.ico {
access_log off;
log_not_found off;
expires 30d;
try_files /sites/$host/files/favicon.ico $uri =204;
}
A site called "example.com" with an alias "example.org" will store its files in sites/example.com/files/. The existing configuration will serve requests for http://example.com/favicon.ico but not http://example.org/favicon.ico. I'm a newcomer to Nginx, but I believe that using `$server_name` instead of `$host` in these cases should resolve the problem.
Comments
Comment #1
omega8cc CreditAttribution: omega8cc commentedRight, we should use $server_name instead.
Thanks for the report!
Comment #2
omega8cc CreditAttribution: omega8cc commentedFix committed:
6.x-1.x - http://drupalcode.org/project/provision.git/commit/2fc157d
6.x-2.x - http://drupalcode.org/project/provision.git/commit/139f867