I have a server block to redirect all http requests to https as follows:
server { listen 0.0.0.0:80; listen [::]:80; server_name a.com b.com c.com; return 301 https://$server_name$request_uri; } It seems that requests coming in using all three domain names on port 80 will be redirected to https://a.com. Is this how $server_name is set?
$hostinstead of$server_name. See What is the difference between Nginx variables $host, $http_host, and $server_name?