jplana/puppet-nginx — pull request #1 by jplana (2014-03-28 18:55:35+00:00)
Title: Allow default vhost location to just redirect requests

Though I'm not a nginx expert, I had the need to create a vhost that just redirects to another address. To be more specific, I just wanted to send back a 301 when accessing the port 80 so users get redirected to port 443.

As the ```redirect``` parameter is not available within nginx::resource::vhost context, I'd need to create a "fake" location and then add the redirect. This PR allows to do the following:

```puppet
nginx::resource::vhost { 'example-80':
server_name => 'example.com',
listen_port => 80,
ensure => present,
redirect => 'https://example.com',
}
````