Skip to content

Instantly share code, notes, and snippets.

@initcron
Created May 12, 2015 08:30
Show Gist options
  • Select an option

  • Save initcron/09d89f804e9514d56950 to your computer and use it in GitHub Desktop.

Select an option

Save initcron/09d89f804e9514d56950 to your computer and use it in GitHub Desktop.
nginx::vhost defined type
define nginx::vhost (
$port = 80,
$site_domain
){
include nginx
file { "/etc/nginx/conf.d/${name}.conf":
content => template('nginx/vhost.conf.erb'),
notify => Service['nginx'],
}
file { "/var/www/${name}":
ensure => directory,
}
file { "/var/www/${name}/index.html":
content => template('nginx/index.html.erb'),
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment