AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[certbot](server)

Martin Hope
LosmiNCL
Asked: 2022-02-16 11:44:06 +0800 CST

Certbot 未经授权和连接错误

  • 0

我在 Google Cloud CentOS 7 上有一个 Spring Boot 应用程序。我希望通过 Let's Encrypt 和 Certbot 安装 SSL 证书。当我使用certbot --apache -d mydomain.zone命令时,我收到一个错误:

在此处输入图像描述

我的域名在 Namecheap 上注册。我在 Google Cloud 上的 A 记录:

在此处输入图像描述

我还像本教程一样在 Namecheap 中提供了谷歌云名称服务器:https ://www.wpmentor.com/setup-domain-google-cloud-platform/

在此处输入图像描述

你能告诉我问题出在哪里吗?我也想知道我的应用程序中的 java 代码是否有问题。例如,有时在访问索引页时,会调用 error_page。当我的控制器中有一个方法时:

@RequestMapping(value = "/error_page", method = RequestMethod.GET)
public String homeError(Model model)
{
  return "/error_page";
}

我有一个不同的 certvbot 错误:

在此处输入图像描述

但是当我评论/删除错误页面的控制器方法时,我收到此错误:

在此处输入图像描述

可能是应用程序错误吗?还是apache的问题?

我试图关闭Tomcat。现在我收到此错误:

在此处输入图像描述

注意:我的 Apache 转发到 8080,不知道会不会有问题?

iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-port  8080
certbot lets-encrypt
  • 1 个回答
  • 875 Views
Martin Hope
Mikey A. Leonetti
Asked: 2022-02-08 12:35:32 +0800 CST

certbot 创建了一个由 root:root 和权限 640 拥有的挑战,而 apache 无法访问它 - 自定义 ACL 应用于父目录

  • 0

在我的服务器上,我拥有在 public_html 文件夹上设置的特殊权限。

首先是粘性位

chmod g+s /home/domain.com/public_html

也是默认组权限。

setfacl -m 'default:group::rwX' /home/domain.com/public_html

当我运行我的 certbot 命令时

certbot certonly \
        --webroot \
        -w /home/domain.com/public_html/ -d domain.com

certbot 将在 public_html 文件夹中创建一个具有正确权限的 .well-known/acme-challenge。它甚至保留正确的组名。但是,acme 挑战本身将具有以下内容。

-rw-r-----  1 root                 root                   87 Feb  7 17:27 ELnik5A0krJsKUsL2If1mVfd2pSzWJAiSSjhA6h-f5E

它由 root 拥有并且具有组 root 并且不能被 apache2 读取。所以整个操作失败了。

添加 --debug-challenges 将允许它暂停,以便我可以手动修复它,但我觉得更新可能是一个问题。

我有什么选择来解决这个问题?

ubuntu access-control-list apache2 certbot lets-encrypt
  • 1 个回答
  • 218 Views
Martin Hope
Andrew Swift
Asked: 2022-02-04 00:52:37 +0800 CST

NginX 网站返回带有 HTTP 的默认页面(HTTPS 正常工作)

  • 1

这必须是重复的,但是我已经搜索了很长时间,但没有找到任何东西。

当我使用http输入我的网站地址时,我得到NginX 默认页面(https 可以正常工作):

http://svija.love

NginX 配置文件最后包含:

server {
    if ($host = svija.love) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    server_name svija.love;
    listen 80;
    return 404; # managed by Certbot
}

这是由 Certbot 自动添加的。

我希望语句if ($host = svija.love)会捕获 http 请求并重定向到 HTTPS。

但它不是那样工作的。

不是专家,在我看来,从server_name svija.love开始的第二部分与第一部分直接矛盾:

  • 如果主机是 svija.love,则第一个块重定向
  • 如果主机是 svija.love,则第二个块返回 404

实际配置的服务器名称是live.svija.love,如果有区别的话。

任何澄清将不胜感激。

[更新]我删除了 NginX 默认配置文件,HTTP 现在按预期重定向到 HTTPS。

不过,如果有人能解释上面的两个配置块,我很想更好地理解他们在做什么。

[更新]这不是一个好的解决方案(见下文)。

[更新这是nginx -T给出的配置:

# configuration file /etc/nginx/nginx.conf:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
    worker_connections 768;
    # multi_accept on;
}

http {

    ##
    # Basic Settings
    ##

    sendfile off;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    # server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip on;

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    # gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}

# configuration file /etc/nginx/modules-enabled/50-mod-http-image-filter.conf:
load_module modules/ngx_http_image_filter_module.so;

# configuration file /etc/nginx/modules-enabled/50-mod-http-xslt-filter.conf:
load_module modules/ngx_http_xslt_filter_module.so;

# configuration file /etc/nginx/modules-enabled/50-mod-mail.conf:
load_module modules/ngx_mail_module.so;

# configuration file /etc/nginx/modules-enabled/50-mod-stream.conf:
load_module modules/ngx_stream_module.so;

# configuration file /etc/nginx/mime.types:

server {

    # must match domain name or IP address
    # or else the default Nginx page will be shown
    server_name antretoise.svija.site;

    # directory of site's static elements
    location /static/ {
        root /home/antretoise;
    }

    access_log /opt/logs/access.antretoise;
    error_log /opt/logs/error.antretoise error;

    # pass all additional queries to our application
    location / {

        # parameters from /etc/nginx/uwsgi_params
        include uwsgi_params;

        # pass the traffic to the socket
        # that the uWSGI server sets up
        # SOCKETS MUST MATCH IN:
        # /etc/uwsgi/sites/antretoise.ini
        uwsgi_pass unix:/run/uwsgi/antretoise.sock;
    }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/antretoise.svija.site/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/antretoise.svija.site/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 = antretoise.svija.site) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    server_name antretoise.svija.site;
    return 404; # managed by Certbot


}
# configuration file /etc/nginx/uwsgi_params:

uwsgi_param  QUERY_STRING       $query_string;
uwsgi_param  REQUEST_METHOD     $request_method;
uwsgi_param  CONTENT_TYPE       $content_type;
uwsgi_param  CONTENT_LENGTH     $content_length;

uwsgi_param  REQUEST_URI        $request_uri;
uwsgi_param  PATH_INFO          $document_uri;
uwsgi_param  DOCUMENT_ROOT      $document_root;
uwsgi_param  SERVER_PROTOCOL    $server_protocol;
uwsgi_param  REQUEST_SCHEME     $scheme;
uwsgi_param  HTTPS              $https if_not_empty;

uwsgi_param  REMOTE_ADDR        $remote_addr;
uwsgi_param  REMOTE_PORT        $remote_port;
uwsgi_param  SERVER_PORT        $server_port;
uwsgi_param  SERVER_NAME        $server_name;

ssl_session_cache shared:le_nginx_SSL:10m;
ssl_session_timeout 1440m;
ssl_session_tickets off;

ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;

ssl_ciphers "EC-AES128-SHA";

#———————————————————————————————————————— default

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    root /var/www/html;

    # Add index.php to the list if you are using PHP
    index index.html index.htm index.nginx-debian.html;

    server_name _;

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
    }

}

#———————————————————————————————————————— svija.love

server {

    server_name svija.love;

    # directory of site's static elements
    location /static/ {
        root /home/svijalove;
    }

    access_log /opt/logs/access.svijalove;
    error_log /opt/logs/error.svijalove error;

    # pass all additional queries to our application
    location / {

        # parameters from /etc/nginx/uwsgi_params
        include uwsgi_params;

        # pass the traffic to the socket
        # that the uWSGI server sets up
        # SOCKETS MUST MATCH IN:
        # /etc/uwsgi/sites/svijalove.ini
        uwsgi_pass unix:/run/uwsgi/svijalove.sock;
    }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/svija.love/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/svija.love/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 = svija.love) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    server_name svija.love;
    listen 80;
    return 404; # managed by Certbot
}

# 6 other sites at end, all configured the same way
# except that in the last two lines,
# listen 80; is sometimes listed BEFORE return 404;
ubuntu nginx https certbot lets-encrypt
  • 2 个回答
  • 1458 Views
Martin Hope
Dimitar Veljanovski
Asked: 2021-11-20 04:30:21 +0800 CST

使用 Certbot 添加 SSL 证书时如何指定 80 以外的端口?

  • 1

我有一台运行 2 个不同的 Web 服务器(Apache 和 Nginx)的服务器。Apache 服务器负责所有指向 Wordpress 站点的流量,而 Nginx 服务器为我的 Python API 和 React Web App 提供服务。

由于与 Apache 的端口冲突,我不得不将 API 设置为在端口 88 上运行,并将 React 应用程序设置为在 90 上运行。我以这种方式对其进行了测试,它工作正常。所有请求都将被转发到 443,所以我认为不安全端口是什么并不重要。

当我最终运行添加证书的命令时:

sudo certbot --nginx -d a.domain.com

这给了我一个错误。经过进一步检查,我发现它试图在端口 80 而不是 88 上打开域。我做了一些研究,找到了--http-01-port规则并将其设置为 88,但它又给了我同样的错误:

sudo certbot --nginx --http-01-port 88 -d a.domain.com

在尝试了这么多次之后,我担心 certbot 可能会因为怀疑垃圾邮件而很快阻止我几个小时或几天,而我已经没有可能的解决方案了。

以前有没有人处理过这个问题?你是怎么解决这个问题的?

port certbot lets-encrypt
  • 2 个回答
  • 6163 Views
Martin Hope
Altimus Prime
Asked: 2021-10-20 05:01:17 +0800 CST

如何禁用“主题备用名称”包含在 Certbot Let's Encrypt 证书中?

  • 5

使用 Certbot 在 nginx 网络服务器上安装 R3 Let's Encrypt 证书会导致 nginx 配置中的所有其他域包含在证书的“主题备用名称”下。这对我的用例来说是不可取的。

我在这里和这里阅读了手册页以及其他一些 Stack Exchange 帖子。

关于替代名称的使用,手册页说(我不完全理解):

-d DOMAIN, --domains DOMAIN, --domain DOMAIN 要应用的域名。对于多个域,您可以使用多个 -d 标志或输入以逗号分隔的域列表作为参数。提供的第一个域将是证书的主题 CN,所有域都将是证书上的主题备用名称。第一个域也将用于某些软件用户界面,并用作证书和相关材料的文件路径,除非另有说明或您已经拥有同名的证书。在名称冲突的情况下,它将在文件路径名称后附加一个数字,例如 0001。(默认:询问)

使用 Certbot 安装 Let's Encrypt 证书时,如何完全指定或省略主题备用名称?如果 Certbot 不能,在使用 R3 Let's Encrypt 证书的同时还有其他方法吗?

ssl-certificate certbot lets-encrypt
  • 1 个回答
  • 1394 Views
Martin Hope
MD Nasirul Islam
Asked: 2021-09-28 05:23:42 +0800 CST

在 Amazon Linux AMI 中安装 certbot nginx

  • 1

我有一个非常旧的amazon linux ami,我需要为运行 php 网站的 nginx 安装 certbot。现在我需要在这个网站上安装 ssl。但我无法在我的服务器上安装 certbot-nginx。每当我尝试安装

sudo yum install python2-certbot-nginx.noarch

它向我显示了一些依赖错误。最后像这样

--> Processing Dependency: python-requests >= 2.6.0 for package: python2-requests-2.6.0-0.el7.noarch
---> Package python2-six.noarch 0:1.9.0-0.el7 will be installed
--> Processing Dependency: python-six >= 1.9.0 for package: python2-six-1.9.0-0.el7.noarch
---> Package setools-libs.x86_64 0:3.3.7-34.23.amzn1 will be installed
--> Finished Dependency Resolution
Error: Package: python2-requests-2.6.0-0.el7.noarch (epel)
           Requires: python-requests >= 2.6.0
           Installed: python26-requests-1.2.3-5.10.amzn1.noarch (@amzn-main)
               python-requests = 1.2.3-5.10.amzn1
Error: Package: python2-acme-1.11.0-1.el7.noarch (epel)
           Requires: python2-cryptography
Error: Package: python2-acme-1.11.0-1.el7.noarch (epel)
           Requires: pyOpenSSL >= 0.13.1
           Installing: python26-pyOpenSSL-0.10-2.8.amzn1.x86_64 (amzn-main)
               pyOpenSSL = 0.10-2.8.amzn1
Error: Package: python2-acme-1.11.0-1.el7.noarch (epel)
           Requires: python2-pyasn1
Error: Package: certbot-1.11.0-1.el7.noarch (epel)
           Requires: systemd
Error: Package: python2-six-1.9.0-0.el7.noarch (epel)
           Requires: python-six >= 1.9.0
           Installed: python26-six-1.8.0-1.23.amzn1.noarch (@amzn-main)
               python-six = 1.8.0-1.23.amzn1
Error: Package: python2-josepy-1.3.0-2.el7.noarch (epel)
           Requires: python2-setuptools
Error: Package: python2-josepy-1.3.0-2.el7.noarch (epel)
           Requires: python2-cryptography
Error: Package: python2-certbot-1.11.0-1.el7.noarch (epel)
           Requires: python2-cryptography >= 1.2.3
Error: Package: python2-acme-1.11.0-1.el7.noarch (epel)
           Requires: pyOpenSSL >= 0.13.1
           Available: python26-pyOpenSSL-0.10-2.8.amzn1.x86_64 (amzn-main)
               pyOpenSSL = 0.10-2.8.amzn1
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我已经尝试安装 yum-utils,package-cleanup --leaves但仍然出现以下错误。谁能告诉我如何防止这个问题?谢谢。顺便说一句,我的服务器 os-release

NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"
PRETTY_NAME="Amazon Linux AMI 2018.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"

谁能帮我这个?我想如果我可以删除所有这些依赖项问题,那么我可以安装 python2-certbot-nginx 并且可以执行 ssl。我能得到什么帮助吗?提前致谢。

amazon-ec2 certbot amazon-linux
  • 1 个回答
  • 1139 Views
Martin Hope
dleviathan
Asked: 2021-09-14 18:09:52 +0800 CST

无法将 Certbot 用于 Nginx 与子域中的 reactjs 应用程序和 laravel 子目录的 SSL

  • 0

我有 1 个 IP 的域和其他 IP 的子域。我为 FE:http://subdomain/ 和 BE:http://subdomain/api 配置了 nginx url。我需要 ssl 子域使用Certbot,在这个我有反应应用程序 FE和php laravel BE都在docker,但没有成功。

nginx.conf

server {
    listen 8888;
    server_name subdomain;

    index index.php index.html;
    root /var/www;
    client_max_body_size 256M;

    error_log /var/log/nginx/fe/error.log;
    access_log /var/log/nginx/fe/access.log;


    ## config path for API
    location ^~ /api  {
        error_log /var/log/nginx/api/error.log;
        access_log /var/log/nginx/api/access.log;

        alias /var/www/api/public;
        if (!-e $request_filename) {
            rewrite ^ /api/index.php last;
        }
        location ~ \.php$ {
            if (!-f $request_filename) {
                return 404;
            }
            fastcgi_pass api:9000;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $request_filename;
        }
    }

    location ~ /.well-known/acme-challenge {
        allow all;
        default_type "text/plain" ;
        alias /var/www/certbot/index.html; <-- #here only static file html with "HelloWorld"
    }

    ## Load staic file for FE
    location / {
        try_files $uri /index.html;
    }
}

当我通过Certbot为 nginx 运行验证 ssl时:

certbot --nginx -d <subdomain> -m <email> 

我有如下错误:

   Domain: <subdomain>
   Type:   unauthorized
   Detail: Invalid response from
   http://<sudomain>/.well-known/acme-challenge/88C3jgQzqOTXDqBbDX_XLZRR0Sw5RGaNUaGyCgedwVs
   [IP]: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n
   <meta charset=\"UTF-8\">\n    <title>HelloWorld</title>\n</head>\n<body>\n\n</body>"

/.well-known/acme-challenge如果我在 nginx 中设置 block onlyallow all;或者allow all; root /certbot/index.html;我有错误

   Domain: <subdomain>
   Type:   unauthorized
   Detail: Invalid response from
   http://<subdomain>/.well-known/acme-challenge/bfp9WEdPO1eb4NPTSPuQCD2jpakgn2-aIUVF62nrwLs
   [IP]: "<html>\r\n<head><title>404 Not
   Found</title></head>\r\n<body>\r\n<center><h1>404 Not
   Found</h1></center>\r\n<hr><center>nginx/1.15.12</c"

如何为 ssl 配置 nginx?

谢谢你的支持。

subdomain ssl nginx certbot
  • 1 个回答
  • 188 Views
Martin Hope
momomo
Asked: 2021-09-12 14:52:40 +0800 CST

为什么我在使用 Certbot 安装 SSL 证书后无法访问我的网站?(运行 Ubuntu 和 Nginx)

  • 1

我无法在我的 nginx 服务器上建立与端口 443 的连接。

我需要端口 443 来启用 https 连接,我使用 certbot 来安装 ssl 证书,我使用默认安装和本指南中的默认说明

即使我已将“nginx full”命令设置为同时打开 http 和 https 端口,我还是通过运行以下命令仔细检查以确保端口 443 确实打开sudo lsof -i -P -n | grep LISTEN,并且在响应中,我得到端口 443 正在使用通过 nginx

我尝试使用 cURL 之类的工具来测试我的端口,端口 80 工作得很好,但是端口 443 没有响应

我缺乏服务器管理经验,我试图检查其他资源,但我不知道还能做什么。

我的站点可用配置:

server {

        root /var/www/muhammed-aldulaimi.com/html;
        index index.html index.htm index.nginx-debian.html;

        server_name muhammed-aldulaimi.com www.muhammed-aldulaimi.com;

        location / {
                try_files $uri $uri/ =404;
        }

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/muhammed-aldulaimi.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/muhammed-aldulaimi.com/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 = www.muhammed-aldulaimi.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    if ($host = muhammed-aldulaimi.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


        listen 80;
        listen [::]:80;

        server_name muhammed-aldulaimi.com www.muhammed-aldulaimi.com;
    return 404; # managed by Certbot

}

ufw状态:

22/tcp                     ALLOW       Anywhere
Nginx Full                 ALLOW       Anywhere
22/tcp (v6)                ALLOW       Anywhere (v6)
Nginx Full (v6)            ALLOW       Anywhere (v6)
ubuntu nginx certbot
  • 1 个回答
  • 685 Views
Martin Hope
IpsRich
Asked: 2021-09-07 23:45:18 +0800 CST

certbot 真的会续订我的证书吗?

  • 4

看着/etc/cron.d/certbot,我觉得不会!该文件包括以下行:

0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew

而且,除非我读错了,否则只有在有一个名为/usr/bin/certbot(有)的可读可执行文件并且没有一个名为/run/systemd/system(但有,即使它是空的)的目录时才会发生更新。

所以我是对的,并且该certbot -q renew位永远不会运行吗?是否还有其他地方也触发了更新?(我认为可能有一些东西,/run/systemd/system因为正在检查,但正如我所说,没有。出于好奇,为什么这个小脚本检查不存在/run/systemd/system?)

这是在 Ubuntu 18.04 上运行最新的certbot(v1.18.0,昨天使用官方说明安装)。

顺便说一句,我跑过:

test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot renew --dry-run

以 root 身份在命令行上,它立即退出,退出状态为 1。

cron ssl-certificate ubuntu-18.04 certbot lets-encrypt
  • 1 个回答
  • 1005 Views
Martin Hope
BairDev
Asked: 2021-08-25 07:06:34 +0800 CST

如何使用letsencrypt / certbot修复证书链?

  • 2

我无法解决以下问题。使用 openssl 验证服务器证书失败,链不完整。

免责声明:我不是管理员,也没有过多地使用证书。

使用 OpenSSL 进行验证

$ openssl verify -CAfile /etc/letsencrypt/live/co2-avatar.com/fullchain.pem  /etc/letsencrypt/live/co2-avatar.com/cert.pem

# /etc/letsencrypt/live/co2-avatar.com/cert.pem: C = US, O = Internet Security Research Group, CN = ISRG Root X1
# error 2 at 2 depth lookup:unable to get issuer certificate

检查证书中的域之一

openssl s_client -connect co2avatar.org:443 -servername co2avatar.org
# CONNECTED(00000003)
# depth=0 CN = gitlab.sustainable-data-platform.org
# verify error:num=20:unable to get local issuer certificate
# verify return:1
# depth=0 CN = gitlab.sustainable-data-platform.org
# verify error:num=21:unable to verify the first certificate
# verify return:1
# ---
# Certificate chain
#  0 s:CN = gitlab.sustainable-data-platform.org
#    i:C = US, O = Let's Encrypt, CN = R3
# ---
# Server certificate
# -----BEGIN CERTIFICATE-----

或运行

curl -v https://co2avatar.org
# *   Trying 85.214.38.88:443...
# * TCP_NODELAY set
# * Connected to co2avatar.org (85.214.38.88) port 443 (#0)
# * ALPN, offering h2
# * ALPN, offering http/1.1
# * successfully set certificate verify locations:
# *   CAfile: /etc/ssl/certs/ca-certificates.crt
#   CApath: /etc/ssl/certs
# * TLSv1.3 (OUT), TLS handshake, Client hello (1):
# * TLSv1.3 (IN), TLS handshake, Server hello (2):
# * TLSv1.2 (IN), TLS handshake, Certificate (11):
# * TLSv1.2 (OUT), TLS alert, unknown CA (560):
# * SSL certificate problem: unable to get local issuer certificate
# * Closing connection 0
# curl: (60) SSL certificate problem: unable to get local issuer certificate

可能两者都有,我的 Apache VHost 中的域配置错误以及证书链本身的问题。我如何检查最后一个(我搜索了很多,但大多数点击是关于openssl verify或-CAfile关于不同的证书颁发者)?

我是否需要检查根证书包以及如何检查?

有没有类似certbot certonly的-addtrust标志?

ssl-certificate certbot lets-encrypt
  • 1 个回答
  • 9677 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve