Hi Francis, to me there seems to be some bug... It's very weird that it worked first and now it does not. For example: set $sub_domain ''; if ($host ~* ^(.*)\.salva\.link$) { set $sub_domain $1; } $sub_domain is always '0'. Can you confirm me? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274541,274784#msg-274784