| Index: modules/nginx/templates/site.erb |
| diff --git a/modules/nginx/templates/site.erb b/modules/nginx/templates/site.erb |
| index b51c98ee0875203273e5c8bcefd9c7f72a36e8c3..c2c07103234a6c84105f799d9038e45506359562 100644 |
| --- a/modules/nginx/templates/site.erb |
| +++ b/modules/nginx/templates/site.erb |
| @@ -71,6 +71,12 @@ location = /50x.html |
| root /usr/share/nginx/html; |
| } |
| +if ($http_host ~ "^(.+)\.$") |
| +{ |
| + set $canonical_host $1; |
| + rewrite ^(.*) $scheme://$canonical_host$1 permanent; |
| +} |
| + |
| <% if @content %> |
| <%= content %> |
| <% end %> |