In my Nginx configuration there’s
server_name ~^(?<domain>.*mygreatsite987778.com.invalid)$ ;
Which works quite good. But When Php does echo $_SERVER['SERVER']
, it sees:
~^(?.*mygreatsite987778.com.invalid)$
Despite it seems logical, is there a way to get the server name that matched the regex? The server variable HTTP_HOST
contains the good value (stuff.mygreatsite987778.com.invalid
). I’d like to keep the SERVER
variable.