You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From looking at templates/vhost/vhost_header.erb, server_host will always be set in any vhost.
Is it possible to make this optional for the case where a client does not send any Host: header (e.g. a load-balancer check), hence nginx will use the vhost as a 'fallthrough'. This would also be useful for "301 redirect everything to www.canonicaldomain.com"
Cheers,
Gavin.
The text was updated successfully, but these errors were encountered:
This can be accomplished by using '' as one of the attributes of 'server_name'. That is, you can use '' only as a fallback, or include '_' in server_name array for whichever vhost you want to be default.
This should probably be better documented, but it does work (and it's the convention nginx already uses / documents).
Hi,
From looking at
templates/vhost/vhost_header.erb
,server_host
will always be set in any vhost.Is it possible to make this optional for the case where a client does not send any Host: header (e.g. a load-balancer check), hence nginx will use the vhost as a 'fallthrough'. This would also be useful for "301 redirect everything to www.canonicaldomain.com"
Cheers,
Gavin.
The text was updated successfully, but these errors were encountered: