Score:0

Can't restart apache (httpd.service) after replacing to new SSL cert (wildCard, working on other servers)

dk flag

I have a wildcard SSL cert that I need to replace in all related servers. It worked fine in all of them but one. I go by the exact same process as in other apache servers, but when I replace the files and try to restart it gives me this error:

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

I've checked the sudo openssl x509 -in ... and it's the same on the old SSL and the new SSL (and the ServerName). The configuration of the <VirtualHost *:443> remains the same as it was, I only changed the path for the crt and key files.

When I try to get errors from sudo tail /etc/httpd/logs/ssl_error_log I get this error:

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

But this domain is not related to the one I'm trying to install new SSL certificate for (nor it is included in the VirtualHost configurations)

this is the output for the commands:

**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.
jp flag
check `apachectl configtest`
MatanyaP avatar
dk flag
Hey, I did, I forgot to mention. It passed fine
djdomi avatar
za flag
did you read your log? ```AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf/httpd.conf:355```
jp flag
Does this answer your question? [NameVirtualHost has no effect](https://serverfault.com/questions/576939/namevirtualhost-has-no-effect)
cn flag
Bob
Most start-up errors won't be logged in the ssl_error_log but will only appear in the error_log
MatanyaP avatar
dk flag
@djdomi As far as I know (and it's very little), this is just a warning, but I commented it out and still same results
djdomi avatar
za flag
please update the question sofar since you changed something
djdomi avatar
za flag
Does this answer your question? [Should I care that the "server certificate does NOT include an ID which matches the server name"?](https://serverfault.com/questions/814948/should-i-care-that-the-server-certificate-does-not-include-an-id-which-matches)
ca flag
first try to fix this : "AH01909: RSA certificate configured for someOtherDomain:443 does NOT include an ID which matches the server name"
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.