Пытаюсь тут при помощи map заставить nginx писать в лог инфу только по домену news.tld, но он пишет по двум доменам news.tld и blank.tld. Чтото в конфиге не так. Как правильно?
http {
map $http_referer $news_access_log {
default 0;
.news.tld 1;
}
log_format main
'$remote_addr - $remote_user [$time_local] '
'$http_host $host "$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$gzip_ratio"';
...
}
server {
listen 80;
listen 443 ssl http2;
server_name news.tld blank.tld;
access_log /var/log/nginx/news.access.log combined if=$news_access_log;
...
}
кусок лога
x.x.x.x - - [01/Feb/2022:17:02:05 +0200] "GET /themes/news/manifest.json HTTP/2.0" 200 527 "https://news.tld/taxation/pdv/73948" "Mozilla/5.0 (Linux; Android 9; SAMSUNG SM-G955F) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/16.0 Chrome/92.0.4515.166 Mobile Safari/537.36"
y.y.y.y - - [01/Feb/2022:17:02:05 +0200] "GET /modules/clients/js/clients/clients.js HTTP/2.0" 200 14861 "https://blank.tld/catalogues/indexes/13" "Mozilla/5.0 (iPhone; CPU iPhone OS 15_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Mobile/15E148 Safari/604.1"