小编Aei*_*sor的帖子

Haproxy 1.5.3 / OpenSSL - 创建 PEM

我使用以下行设置了 HAProxy 服务器:

bind *:443 ssl crt /etc/ssl/domain.com/domain.com.pem

我有以下文件:

/etc/ssl/domain.com/domain.com.key

/etc/ssl/domain.com/domain.com.csr

我从 Geotrust 购买了一个证书,它给了我一个Primary Intermediate Certificate,Secondary Intermediate CertificateEnd Entity Certificate

我已经按照 PIC、SID、EEC、KEY 顺序连接了文件,/etc/ssl/domain.com/domain.com.pem其中传递openssl verify /etc/ssl/domain.com/domain.com.pemopenssl verify -CAfile /etc/ssl/domain.com/domain.com.pem /etc/ssl/domain.com/domain.com.pem

我还使用http://www.sslshopper.com/certificate-decoder.html验证了这个文件

当我跑步时,haproxy -f /etc/haproxy/haproxy.cfg -c我得到

'bind *:443 : inconsistencies between private key and certificate loaded from PEM file '/etc/ssl/domain.com/domain.com.pem'

Proxy 'http-in': no SSL certificate specified for bind '*:443' at [/etc/haproxy/haproxy.cfg] (use 'crt')

我是 SSL 证书的新手,我被困在哪里。谷歌搜索的答案让我跑了一英里,我没有进一步前进。

我在以这种方式创建 .pem …

openssl haproxy

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

Windows Server 2008 R2 PowerShell 脚本手动运行,但不是作为计划任务运行

我有一个使用PowerShell ISE手动运行的 PowerShell 脚本。但是,当使用管理员凭据作为计划任务运行时,该任务不会以预期的结果运行。

剧本:

$request=new-object System.Net.WebClient
$request.DownloadFile("...url...", "C:\path\to\file.csv")
Run Code Online (Sandbox Code Playgroud)

管理员用户对脚本及其写入的文件夹具有完全控制权。URL 存在并在合理的时间内(少于一秒)作出响应。

如果我手动运行任务,状态为 0x41301(“当前正在运行”),直到我最终结束它。我已经使用这两种方法设置了任务:

  1. 启动程序: C:\path\to\PS.PS1
  2. 启动程序:C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe带有附加选项-noninteractive -command "C:\path\to\PS.PS1"

使用选项 1,任务历史记录显示它已打开 notepad.exe 的一个实例,但从未终止它。使用选项 2 可以完成任务,但不会下载/创建文件。

我使用过,Set-ExecutionPolicy Unrestricted因为这不是签名脚本。

我该如何解决这个问题?

powershell windows-server-2008-r2

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