sed '3a\ if ($host = www.${1}) {return 301 https://${1}$request_uri;}' /etc/nginx/vhosts/user_ru/$1.conf > /etc/nginx/vhosts/user_ru/$1.conf.tmp
if ($host = www.${1}) {return 301 https://${1}$request_uri;}
sed '3a\ if ($host = www.'$1') {return 301 https://'$1'$request_uri;}' /etc/nginx/vhosts/vach
sed "3a\ if (\$host = www.$1) {return 301 https://$1\$request_uri;}" /etc/nginx/vhosts/vach