Syntax: server_name_in_redirect on | off; Default: server_name_in_redirect off; Context: http, server, location
Enables or disables the use of the primary server name, specified by the server_name directive, in absolute redirects issued by nginx. When the use of the primary server name is disabled, the name from the “Host” request header field is used. If this field is not present, the IP address of the server is used.
The use of a port in redirects is controlled by the port_in_r