[英]How to configure proxy servers with puppet nginx?
目前,我有一個使用此配置的代理設置,我想使用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;
}
到目前為止,我有:
node default {
class { 'nginx': }
nginx::resource::upstream { 'unicorn':
ensure => present,
members => [
'unix:/home/vagrant/website/tmp/sockets/unicorn.sock fail_timeout=0;'
],
}
}
但是我不確定如何為服務器部分添加詳細信息。
使用nginx::resource::vhost
您正在使用的回購源提供了您將需要使用的命令的細分:
https://github.com/puppetlabs/puppetlabs-nginx/blob/master/manifests/resource/vhost.pp
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.