Backport osl-apache vhost fixes into osl-nginx

This imports much of the work done in ``osl-apache`` into nginx. That way we're basically using the same type of definition between either http server.
You can combine this test with the one below.

`[80 443].each do |p|`