小编Eri*_*ner的帖子

在 Haproxy 中配置多个 SSL 证书

我的 haproxy 实例服务于 2 个域(主要是为了避免主站点上的 XSS)。

规则看起来像这样

bind :443 ssl crt /etc/ssl/haproxy.pem

acl is_static   hdr_end(Host) -i example.com
acl is_api      hdr_end(Host) -i api.example.com
acl is_files    hdr_end(Host) -i example.io

redirect scheme https if !{ ssl_fc } is_static is_api
Run Code Online (Sandbox Code Playgroud)

现在 SSL/etc/ssl/haproxy.pem用作默认证书,它是example.com而非的证书example.io

如何为多个域名指定证书?

haproxy

41
推荐指数
3
解决办法
10万
查看次数

当 UsePAM 设置为“no”时,SSH 公钥身份验证失败

要禁用密码身份验证,我在我的 sshd_config

ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
Run Code Online (Sandbox Code Playgroud)

当我尝试使用我的私钥登录时,我得到

Permission denied (publickey).
Run Code Online (Sandbox Code Playgroud)

如果我然后更改UsePAMyes我可以使用我的私钥登录。为什么?

我正在从 OSX 连接到 Ubuntu 12.04 64 位主机

ssh -i ~/.ssh/deploy -l deploy localhost -p 2222 -v
Run Code Online (Sandbox Code Playgroud)

这是详细的ssh输出:

OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /Users/<user>/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to localhost [127.0.0.1] port 2222.
debug1: Connection established.
debug1: identity file /Users/<user>/.ssh/deploy type 1
debug1: identity file /Users/<user>/.ssh/deploy-cert …
Run Code Online (Sandbox Code Playgroud)

linux ssh

26
推荐指数
2
解决办法
6万
查看次数

没有模块的木偶模板

我想在没有 puppetmaster 的情况下使用 puppet,并使用 git push 工作流应用清单。我想避免将所有内容分成模块,因为服务器配置不是很复杂。但是,该template()函数在访问不在模块中的模板时似乎存在问题。

如果清单位于<puppet-root>/manifests/site.pp我如何引用例如<puppet-root>/templates/sshd_config.erb

puppet

5
推荐指数
1
解决办法
585
查看次数

将变量传递给 ansible playbook

我需要从目标机器上的 S3 中提取构建。因此,我需要以某种方式将 S3 密钥和秘密传递给 ansible playbook。

我知道我可以定义它们

  • 库存
  • 剧本本身

但我真的不想在那里存储凭据。

我可以在 ansible playbook 中使用来自本地机器(或类似的东西)的环境变量吗?

ansible

2
推荐指数
1
解决办法
3231
查看次数

负载平衡 RAM 或 CPU 密集型?

我需要将机器配置为负载均衡器(可能使用 HAProxy),现在的问题是

  • 一台拥有 512MB/2CPU 内核的机器就足够了吗?
  • 负载平衡是更多的 RAM 还是 CPU 密集型(或两者)?
  • LB机器的好配置是什么?

load-balancing

1
推荐指数
1
解决办法
2782
查看次数

标签 统计

ansible ×1

haproxy ×1

linux ×1

load-balancing ×1

puppet ×1

ssh ×1