[英]How to configure proxy servers with puppet nginx?
Currently I have a proxy setup with this config, that i'd like to setup using https://github.com/puppetlabs/puppetlabs-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;
}
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
使用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 https://github.com/puppetlabs/puppetlabs-nginx/blob/master/manifests/resource/vhost.pp
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.