标签: certbot

Nginx 允许来自任何域的流量

我用nginx的是代理服务器。我的应用程序有一个功能,用户可以使用自己的域而不是我的域。为此,他们需要将其 CNAME 指向我的域。

这是我的 Nginx 配置

server {
  server_name                   scan.mydomain.com anonymous.mydomain.com "";
  access_log                    /etc/nginx/log/local-wc.access.log;
  error_log                     /etc/nginx/log/local-wc.error.log;

  location / {
    root                      /var/www/html/qcg-scanning-frontend/dist/webapp/;
    index                     index.html;
    try_files                 $uri $uri/ /index.html;
    proxy_redirect            off;
    proxy_set_header          Host            $host;
    proxy_set_header          X-Real-IP       $remote_addr;
    proxy_set_header          X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header          X-Forwarded-Protocol $scheme;
  }

  listen 443 ssl; # managed by Certbot
  ssl_certificate /etc/letsencrypt/live/anonymous.mydomain.com-0001/fullchain.pem; # managed by Certbot
  ssl_certificate_key /etc/letsencrypt/live/anonymous.mydomain.com-0001/privkey.pem; # managed by Certbot
  include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

server {
  if ($host …
Run Code Online (Sandbox Code Playgroud)

ssl nginx lets-encrypt certbot

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

certbot 证书请求 - 连接被拒绝

我收到 certbot 的错误消息,表示在尝试创建证书时连接被拒绝。我检查了 DNS 条目,它具有正确的服务器 IP。

当我尝试调用该域时,浏览器也显示连接被拒绝。我猜至少 nginx 应该正确运行并显示 wordpress ?为什么我的连接被拒绝?

MPORTANT NOTES:
certbot      |  - The following errors were reported by the server:
certbot      |
certbot      |    Domain: retronexus.net
certbot      |    Type:   connection
certbot      |    Detail: Fetching
certbot      |    http://retronexus.net/.well-known/acme-challenge/YQzSQsdAAhqG45A5xAL3tJ4dMrsmTVfcKQVGNzT1lvs:
certbot      |    Connection refused
certbot      |
certbot      |    Domain: www.retronexus.net
certbot      |    Type:   connection
certbot      |    Detail: Fetching
certbot      |    http://www.retronexus.net/.well-known/acme-challenge/K-KuvzQCJWC-k_2VyJJoeSmP1HQcZE71g6giBvWSCJs:
certbot      |    Connection refused
certbot      |
certbot      |    To fix these errors, please make sure that your domain …
Run Code Online (Sandbox Code Playgroud)

wordpress nginx docker certbot

5
推荐指数
0
解决办法
1152
查看次数

将 LetsEncrypt 文件复制到 docker 容器

我不是 docker 专家,我只是在习惯它。我想将主机上生成的 ssl 证书复制到我的 docker 容器中。我读到它应该能够处理volumesdocker-compose 文件中的参数,但启动我的服务器时它总是令人兴奋,因为它无法在工作目录中找到复制的文件。

文件夹结构

- repo
   - backend
      - api
         - static
            - ssl
         - dockerfile
   - frontend
   - docker-compose.yml
Run Code Online (Sandbox Code Playgroud)

Dockerfile

FROM node:14-alpine

ENV NODE_ENV=production SERVER_PORT_HTTP=80 SERVER_PORT_HTTPS=443

WORKDIR /usr/src/app

RUN npm install

COPY . .

EXPOSE ${SERVER_PORT_HTTP} ${SERVER_PORT_HTTPS}

CMD [ "npm", "run", "start" ]
Run Code Online (Sandbox Code Playgroud)

Docker-Compose

version: "3"

services:
  api:
    build:
      context: ./backend/api
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /etc/letsencrypt/live/api.example.com:/static/ssl
    restart: unless-stopped
Run Code Online (Sandbox Code Playgroud)

docker docker-compose lets-encrypt certbot

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

DNS 问题:NXDOMAIN 正在查找 A 来查找 www.exampl.com - 检查该域是否存在 DNS 记录

我将通过 certbot 为 nginx 安装 SSL

但我遇到这个错误:“DNS 问题:NXDOMAIN 正在查找www.example.com的 A - 检查该域是否存在 DNS 记录”

但是,我在 Cloudflare 中有两条 A 记录:

example.com     ip
www             ip
Run Code Online (Sandbox Code Playgroud)

我应该怎么办?

dns ssl nginx certbot

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

自动删除所有未使用的 certbot 证书

我知道certbot certificates给了我所有可用证书的完整列表。

我也知道certbot delete做了同样的事情,然后让我能够删除一个。

但是,考虑到 certbot 与 nginx 和 apache 集成,有没有办法让它删除当前 nginx 未使用的所有证书

另一种方法是打开 中的所有配置/etc/nginx/site-enabled,记下所有正在使用的证书,运行certbot certificates,记下所有未使用的证书并在列表中一一找到它们certbot delete

nginx certbot

5
推荐指数
0
解决办法
1046
查看次数

证书未到期更新,但模拟更新以进行试运行

我正在为我的域名使用 certbot-auto 生成证书 https。我使用这样的命令

sudo ./certbot-auto
Run Code Online (Sandbox Code Playgroud)

没关系,但是当我更新证书时使用命令

sudo ./certbot-auto renew --dry-run
Run Code Online (Sandbox Code Playgroud)

它无法更新证书并显示如下错误消息:

/root/.local/share/letsencrypt/lib/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6
  DeprecationWarning
Saving debug log to /var/log/letsencrypt/letsencrypt.log

-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/example.asia.conf
-------------------------------------------------------------------------------
Cert not due for renewal, but simulating renewal for dry run
Starting new HTTPS connection (1): acme-staging.api.letsencrypt.org
Renewing an existing certificate
Performing the following challenges:
tls-sni-01 challenge for example.asia
tls-sni-01 …
Run Code Online (Sandbox Code Playgroud)

python ssl centos6 centos6.5 certbot

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

Letsencrypt certbot-nginx插件。它是如何工作的?

我成功使用certbot-nginx插件。

我知道是开源的,托管在github上。

但是我没有足够的技能来分析此代码。

例如:

我有几个由nginx代理的内部站点。所有virtualhost配置均具有以下匿名访问限制:

allow 192.168.1.0/24;
allow 192.168.0.0/24;
allow 10.88.0.0/16;
allow 127.0.0.1;
# gate1.example.com
allow X.X.X.X;
# gate2.example.com
allow X.X.X.X;
# other gate's
# .......
deny all;
Run Code Online (Sandbox Code Playgroud)

此访问限制禁止letencrypt服务器以及所有其他未定义的主机。

但是certbot renew --nginx正常执行证书更新。

它是如何工作的 ?

是否安全?

nginx lets-encrypt certbot

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

让我们进行加密:如何手动测试certbot续订过程?

我有一个有效的设置,其中,我们使用certbot生成“ 让我们加密”证书。我想知道您如何有效地测试更新是否可以在生产中使用。

证书有效期为90天。有没有一种方法可以将使用寿命缩短到例如10分钟,以查看更新是否有效?(为此,可以使用登台系统。)

如果您有另一种方法来确保续订代码有效(不必等待90天),也将不胜感激。

manual-testing lets-encrypt certbot

4
推荐指数
2
解决办法
2569
查看次数

无法“openssl 验证”letsencrypt 证书

我使用 Certbot 容器通过 Letsencrypt 生成证书:

$ mkdir /home/$USER/letsencrypt
$ docker run -it --rm -p 80:80 -p 443:443 -v /home/$USER/letsencrypt:/etc/letsencrypt certbot/certbot certonly --standalone --email user@example.com --agree-tos -d example.com
Run Code Online (Sandbox Code Playgroud)

我导航到生成的证书:

$ cd /home/$USER/letsencrypt/live/example.com
Run Code Online (Sandbox Code Playgroud)

我可以验证chain.pem

$ openssl verify chain.pem 
chain.pem: OK
Run Code Online (Sandbox Code Playgroud)

我可以看到里面有什么chain.pem

$ openssl x509 -noout -in chain.pem -subject -issuer
subject=C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
issuer=O = Digital Signature Trust Co., CN = DST Root CA X3
Run Code Online (Sandbox Code Playgroud)

我无法验证cert.pem(大概是因为它需要链):

$ …
Run Code Online (Sandbox Code Playgroud)

ssl openssl lets-encrypt certbot

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

服务“certbot”无法构建:phusion/baseimage 的清单:最新未找到:清单未知:清单未知

感谢您的阅读!

当我docker-compose up在 laradock 上做的时候,我终于得到了一个类似 title 的错误。

在这种情况下,有人知道正确的解决方案吗?

  • 最初,我有那个 laradock,但我不小心docker-composer down再次尝试构建。当时我收到了一个类似标题的错误。

在这种情况下,我应该docker pull certbot /certbot从 dockerhub运行吗?

我是docker系统的初学者。你有什么想法?

感谢您的阅读!

这是我的错误代码。

laradock mycomputer$ docker-compose up -d
Building certbot
Step 1/6 : FROM phusion/baseimage:latest
ERROR: Service 'certbot' failed to build: manifest for phusion/baseimage:latest not found: manifest unknown: manifest unknown
Run Code Online (Sandbox Code Playgroud)

laravel docker certbot laradock

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