我正在尝试设置 LetsEncrypt(现在显然是 Greenlock)以使用 Express 进行端口转发。
我解决了第一个问题:
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000
iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 3443
Run Code Online (Sandbox Code Playgroud)
问题是,现在我得到:
Fetching certificate for 'xxx' to use as default for HTTPS server...
[acme-v2] handled(?) rejection as errback:
Error: connect ECONNREFUSED 127.0.1.1:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1126:14)
Error loading/registering certificate for 'xxx':
Error: connect ECONNREFUSED 127.0.1.1:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1126:14) {
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: …Run Code Online (Sandbox Code Playgroud) 我在 AWS EC2 服务器上有一个 nodejs/express api,带有每 3 个月由 Let's encrypt 生成的 ssl 证书。自动续订未开启,我们在尝试续订之前让它过期,但在续订后我们收到一条错误消息:
无法验证第一个证书
或者
UNABLE_TO_VERIFY_LEAF_SIGNATURE
取决于我们测试的内容。
我们使用Certbot以下命令(而不是$ certbot renew)进行更新:
$ sudo certbot certonly --dns-route53 -d *.example.com -d example.com --server https://acme-v02.api.letsencrypt.org/directory
Run Code Online (Sandbox Code Playgroud)
证书按预期生成,有效期为 3 个月后。
对发生的事情有什么想法吗?我已经尝试了在 SO 和其他地方可以找到的大部分内容,但没有任何效果。
PS 服务器和我相处得不太好:/(我做移动应用程序开发)所以假设我在回复时什么都不知道:D
我按照本教程https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-with-cert-manager-on-digitalocean-kubernetes为我的设备颁发 SSL 证书使用证书管理器进入,让我们加密,我运行此错误 Issuing certificate as Secret does not exist。是我的配置错误吗?这是一个 Minikube 本地集群。
staging_issuer.yaml
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-staging
namespace: cert-manager
spec:
acme:
# The ACME server URL
server: https://acme-staging-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: email_address
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-staging
# Enable the HTTP-01 challenge provider
solvers:
- http01:
ingress:
class: nginx
Run Code Online (Sandbox Code Playgroud)
入口.yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: echo-ingress
annotations: …Run Code Online (Sandbox Code Playgroud) 我希望这个网站www.albunack.net支持 SSL
它作为 Java WAR 文件安装到位于 albunack.elasticbeanstalk.com 的 AWS Elastic Beanstalk 上,dns(作为单个实例)配置受 Route 53 控制。
我没有太多的系统管理知识,为此启用 SSL 的最简单方法是什么
这是一个非常具体的请求,因此我希望通过一系列具体步骤来实现这一目标,而不是一般性建议。
我使用 helm 安装了 cert-manager (v1.8.0)。
\n应用了我的 ClusterIssuerkubectl apply -f issuer.yaml
apiVersion: cert-manager.io/v1\nkind: ClusterIssuer\nmetadata:\n name: letsencrypt-nginx\nspec:\n # ACME issuer configuration\n # `email` - the email address to be associated with the ACME account (make sure it\'s a valid one)\n # `server` - the URL used to access the ACME server\xe2\x80\x99s directory endpoint\n # `privateKeySecretRef` - Kubernetes Secret to store the automatically generated ACME account private key\n acme:\n email: \'myemail\'\n server: https://acme-staging-v02.api.letsencrypt.org/directory\n …Run Code Online (Sandbox Code Playgroud) 在尝试生成LetsEncript证书时,我得到以下403.
[ec2-user @ myip html] $/opt/letsencrypt/letsencrypt-auto certonly --webroot -w/var/www/html -d example.com -d www.example.com --config/etc/letsencrypt/config的.ini --agree-TOS检查新版本...请求root权限才能运行letsencrypt ...须藤/home/ec2-user/.local/share/letsencrypt/bin/letsencrypt certonly --webroot -w在/ var/www/html/myroot -d example.com -d www.example.com --config /etc/letsencrypt/config.ini --agree-tos版本:1.1-20080819版本:1.1-20080819授权程序失败.mydomain.com(HTTP-01):瓮:ACME:错误:未经授权的::客户端缺乏足够的授权::从无效响应 http://example.com/.well-known/acme-challenge/IDug1d_rT8rZNPQQfdsgfdgsdfBKRJaHMTa3kulh4HnQ [52.30.98.10 ]:403
重要说明: - 服务器报告了以下错误:
域:mydomain.com类型:未经授权的详情:从响应无效http://example.com/.well-known/acme-
挑战/ IDug1d_rT8rZNPQQkjsdgfdgdfggdfajhsTa3kulh4HnQ
403:[52.30.98.101]要修复这些错误,请确保您的域名
输入正确,并且该域的DNS A记录
包含正确的IP地址.
有没有理由说Facebook不允许在他们的"应用程序开发"部分中使用LetsEncrypt签名证书?
我一直收到这个错误:(
对于未经训练的人来说,这是我尝试为新消息通知设置webhook)

模糊了主机,但它是一个有效的主机,在Linux和Windows上使用chrome或firefox不会出现任何错误.
SSLLabs还表示该网站完全有效.
curl https://...在我自己的主机上运行,果然我得到了同样的错误,
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
Run Code Online (Sandbox Code Playgroud)
所以我的问题是,为什么Facebook(公开支持LetsEncrypt)决定使用默认curl CA捆绑来验证应用的回调网址?如果那不允许LetsEncrypt?
这对我来说似乎适得其反.
有没有解决的办法?
我使用nginx作为代理将请求转发到其他组件(服务器).
每个组件,包括nginx都实现为docker容器,即我有一个docker容器,用于'nginx-proxy','dashboard-server','backend-server'(REST API)和'landing-server'(登陆页面) .后三个组件都是NodeJS Express服务器并且在我使用命令docker-compose build时没有错误但是当我使用docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -dNodeJS容器启动容器时工作正常,但是nginx容器使用docker-compose logs nginx-proxy以下方法给出了这个错误:
Attaching to docker_nginx-proxy_1
nginx-proxy_1 | /start.sh: line 5: openssl: command not found
nginx-proxy_1 | Creating dhparams…\c
nginx-proxy_1 | ok
nginx-proxy_1 | Starting nginx…
nginx-proxy_1 | 2017/08/23 23:27:20 [emerg] 6#6:
BIO_new_file(“/etc/letsencrypt/live/admin.domain.com/fullchain.pem”)
failed (SSL: error:02001002:system library:fopen:No such file or directory:
fopen(‘/etc/letsencrypt/live/admin.domain.com/fullchain.pem’,‘r’) error:2006D080:BIO routines:BIO_new_file:no such file)
nginx-proxy_1 | nginx: [emerg]
BIO_new_file(“/etc/letsencrypt/live/admin.domain.com/fullchain.pem”) failed (SSL: error:02001002:system library:fopen:
No such file or directory:fopen(‘/etc/letsencrypt/live/admin.domain.com/fullchain.pem’,‘r’)error:2006D080:BIO routines:BIO_new_file:no such file) …Run Code Online (Sandbox Code Playgroud) 我也尝试在我的网站上设置“让我们加密”。我在网上找到了很多解决方案,很遗憾,没有一个对我有用。
我在使用Apache 2和.NET Core 2.0的Debian 8.7。
我尝试将web.config(及其一些变体)放置在.well-known / acme-challenge文件夹中,以免碰运气。我在这些链接上尝试过解决方案(主要是添加web.config并添加一些代码):
https://github.com/ebekker/ACMESharp/issues/15
为letencrypt设置web.config-使用Asp.NET Core和Angular 2(Javascript-services)进行认证
我已经看到了,但这是一个已知的文件名,LE提供了随机文件名,因此我不知道如何实现它: asp.net core-如何在不扩展名的情况下提供静态文件
我知道我得到正确的URL并不是问题,就好像我将扩展名(例如.t)添加到文件中,然后将其添加到URL中一样,站点可以正确地返回文件。
这是acme-challenge中的web.config:
<?xml version = "1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".*" mimeType="text/plain" />
</staticContent>
<handlers>
<clear />
<add name="StaticFile" path="*" verb="*" type="" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" scriptProcessor="" resourceType="Either" requireAccess="Read" allowPathInfo="false" preCondition="" responseBufferLimit="4194304" />
</handlers>
</system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)
这是整个web.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\my.site.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)
这是添加到Configure()中的代码:
app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new …Run Code Online (Sandbox Code Playgroud) 我有一个角度应用程序,已将其部署在Heroku上。另外,我还有一个从GoDaddy购买的个人域名。
因此,我的xxxx.mydomain.com当前显示xxxx.heroku.com(免费dyno)
xxxx.heroku.com已使用“ https”保护安全,但我新购买的域是“ http”。我想使用Cloudflare的通用SSL或“让我们加密SSL”来保护我的xxxx.mydomain.com。可能吗?
任何指针将不胜感激。谢谢。
lets-encrypt ×10
amazon-ec2 ×2
node.js ×2
ssl ×2
.htaccess ×1
.net-core ×1
angular ×1
apache ×1
asp.net-core ×1
azure ×1
c# ×1
cert-manager ×1
certbot ×1
cloudflare ×1
curl ×1
docker ×1
drupal ×1
express ×1
facebook ×1
greenlock ×1
heroku ×1
java ×1
kubernetes ×1
minikube ×1
nginx ×1
openssl ×1