Currently I have a proxy setup with this config, that i'd like to setup using https://github.com/puppetlabs/puppetlabs-nginx
upstream unicorn {
server unix:/home/vagrant/website/tmp/sockets/unicorn.sock fail_timeout=0;
}
server {
listen 80 default;
root /home/vagrant/website/public;
try_files $uri/index.html $uri @unicorn;
location @unicorn {
proxy_pass http://unicorn;
}
error_page 500 502 503 504 /500.html;
}
So far I have:
node default {
class { 'nginx': }
nginx::resource::upstream { 'unicorn':
ensure => present,
members => [
'unix:/home/vagrant/website/tmp/sockets/unicorn.sock fail_timeout=0;'
],
}
}
But I'm not sure how to add the details for the server section.
Use nginx::resource::vhost
The source of the repo you are using gives a breakdown of the commands you will need to use:
https://github.com/puppetlabs/puppetlabs-nginx/blob/master/manifests/resource/vhost.pp
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.