rewrite_to_https, if using the default port of 443, works fine. if not using 443, it doesn't work because the line that puppet generates doesn't include the custom port number. The fix is here in templates/vhost/vhost_header.rb: change this: ``` if ($ssl_protocol = "") { return 301 https://$host$request_uri; } ``` to this: ``` if ($ssl_protocol = "") { return 301 https://$host<%if @ssl_port != 443%>:<%= @ssl_port %><% end %>$request_uri; } ```