How to correctly write a config for a multi-language site? Is it right to make several blocks with redirects with www or is there a more compact option in one block as with the main domains? In the official documentation did not find ...
upstream fastcgi_backend { server unix:/var/run/php/php7.0-fpm.sock; } map $http_host $MAGE_RUN_CODE { domain.com default; domain.ru russian; } server { listen 80; server_name www.domain.com; return 301 $scheme://domain.com$request_uri; } server { listen 80; server_name www.domain.ru; return 301 $scheme://domain.ru$request_uri; } server { listen 80; server_name domain.com domain.ru; set $MAGE_ROOT /var/www/domain.com/html; set $MAGE_MODE default; }