AH02565:证书和私钥来自和不匹配

AH02565:证书和私钥来自和不匹配

我正在尝试在某些 Ubuntu 和 Redhat 服务器上内部更新一些过期的 SSL 证书。我有一个内部证书颁发机构 (ADCS)。以下是我正在采取的步骤:

  1. 使用 openssl 生成 CSR + 私钥

openssl req -out 文件.csr -newkey rsa:2048 -nodes -keyout 文件.key -config req.conf

  1. 将 CSR 提交至内部 Active Directory 证书颁发机构

  2. 我得到了一份 base64 格式的证书。

  3. 我在 Web 服务器上使用此证书和私钥。当我在运行 lighttpd 的 Ubuntu Web 服务器上执行此操作时,一切正常。我更新证书/密钥并重新启动 lig​​httpd,一切正常。

我重复了这些确切的步骤,但这次是针对运行 Httpd 的 Redhat 7/8 服务器,我收到以下错误:AH02565:证书和私钥来自和不匹配

我可能已经生成了五六次新的私钥/csr,希望结果会有所不同:D

我在这里做错了什么?

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:443                  127.0.0.1 (/etc/httpd/conf.d/ssl.conf:39)
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex watchdog-callback: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex authdigest-client: using_defaults
Mutex lua-ivm-shm: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/etc/httpd/run/" mechanism=default
Mutex cache-socache: using_defaults
Mutex authdigest-opaque: using_defaults
PidFile: "/etc/httpd/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="apache" id=48
Group: name="apache" id=48

答案1

无论出于什么原因,在我重命名证书和密钥并将它们移至上一级目录后,它都能正常工作。我不确定为什么,因为文件内容、文件所有者和文件权限都相同。算了。

相关内容