更换为新的 SSL 证书(wildCard,在其他服务器上运行)后无法重新启动 apache(httpd.service)

更换为新的 SSL 证书(wildCard,在其他服务器上运行)后无法重新启动 apache(httpd.service)

我有一个通配符 SSL 证书,需要在所有相关服务器中替换。除了一个之外,它在所有其他服务器上都运行良好。我按照与其他 Apache 服务器完全相同的过程进行操作,但当我替换文件并尝试重新启动时,它给出了此错误:

Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

我检查了,sudo openssl x509 -in ...旧的 SSL 和新的 SSL(以及 ServerName)上的内容相同。的配置<VirtualHost *:443>保持不变,我只更改了 crt 和密钥文件的路径。

当我尝试从中获取错误时,sudo tail /etc/httpd/logs/ssl_error_log出现此错误:

AH01909: RSA certificate configured for someOtherDomain:443 does NOT include an ID which matches the server name

但此域名与我尝试安装新 SSL 证书的域名无关(也不包含在 VirtualHost 配置中)

这是命令的输出:

**systemctl status httpd.service**
    httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2022-01-03 09:21:23 UTC; 11s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 31404 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 19784 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
  Process: 31402 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 31402 (code=exited, status=1/FAILURE)

Jan 03 09:21:23 systemd[1]: Starting The Apache HTTP Server...
Jan 03 09:21:23 httpd[31402]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf/httpd.conf:355
Jan 03 09:21:23 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jan 03 09:21:23 kill[31404]: kill: cannot find process ""
Jan 03 09:21:23 systemd[1]: httpd.service: control process exited, code=exited status=1
Jan 03 09:21:23 systemd[1]: Failed to start The Apache HTTP Server.
Jan 03 09:21:23 systemd[1]: Unit httpd.service entered failed state.
Jan 03 09:21:23  systemd[1]: httpd.service failed.


**journalctl -xe**
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-1006107.scope has begun starting up.
Jan 03 09:20:01 serverName CROND[31225]: (root) CMD (/usr/bin/php /var/www/html/serverName/server/cron.php >> /var/www/html/serverName/data/log/testcron.txt)
Jan 03 09:20:59 serverName sudo[31319]:  name: TTY=pts/0 ; PWD=/etc/httpd/conf ; USER=root ; COMMAND=/bin/nano httpd.conf
Jan 03 09:21:01 serverName systemd[1]: Started Session 1006108 of user root.
-- Subject: Unit session-1006108.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-1006108.scope has finished starting up.
--
-- The start-up result is done.
Jan 03 09:21:01 serverName systemd[1]: Starting Session 1006108 of user root.
-- Subject: Unit session-1006108.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-1006108.scope has begun starting up.
Jan 03 09:21:01 serverName CROND[31323]: (root) CMD (/usr/bin/php /var/www/html/sport5appserver/server/cron.php >> /var/www/html/serverName/data/log/testcron.txt)
Jan 03 09:21:22 serverName sudo[31388]:  cambium : TTY=pts/0 ; PWD=/etc/httpd/conf ; USER=root ; COMMAND=/bin/systemctl restart httpd.service
Jan 03 09:21:22 serverName polkitd[334]: Registered Authentication Agent for unix-process:31389:5936544645 (system bus name :1.2013839 [/usr/bin/pkttyagent --notify-fd 5 --fallback], o
Jan 03 09:21:22 serverName systemd[1]: Stopping The Apache HTTP Server...
-- Subject: Unit httpd.service has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun shutting down.
Jan 03 09:21:23 serverName systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Jan 03 09:21:23 serverName httpd[31402]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf/httpd.conf:355
Jan 03 09:21:23 serverName systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jan 03 09:21:23 serverName kill[31404]: kill: cannot find process ""
Jan 03 09:21:23 serverName systemd[1]: httpd.service: control process exited, code=exited status=1
Jan 03 09:21:23 serverName systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Jan 03 09:21:23 serverName systemd[1]: Unit httpd.service entered failed state.
Jan 03 09:21:23 serverName systemd[1]: httpd.service failed.

相关内容