Failed to start The Apache HTTP Server: Invalid command ‘SSLPassPhraseDialog’

I should not but when I’m in hurry I tend to rsync configurations from one machine to another. In this case, I want to start an Apache instance on a CentOS 8 stream machine. First I get the httpd.conf file from my working machine ‘working‘ to my client ‘client‘:

client $ > rsync -av root@working:/etc/httpd/conf/httpd.conf \ /etc/httpd/conf/httpd.conf --delete-after --progress
client $ > systemctl restart httpd
client $ > systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: active (running) since DATE
Docs: man:httpd.service(8)
Main PID: YYY (httpd)
Status: "Started, listening on: port 80"
Tasks: 214 (limit: 3297467)
Memory: 47.8M
CGroup: /system.slice/httpd.service
├─304637 /usr/sbin/httpd -DFOREGROUND
└─304644 /usr/sbin/httpd -DFOREGROUND
DATE client systemd[1]: Starting The Apache HTTP Server...
DATE client httpd[304637]:
AH00112: Warning: DocumentRoot
[/var/www/html/munin] does not exist
DATE client systemd[1]: Started The Apache HTTP Server.

So the Apache server works but I can’t access the page because of DocumentRoot. I was expecting this. I’m fixing a broken previous configuration! Yeah that’s me, always fixing broken things. But let’s continue. To clean up DocumentRoot we rsync that one also from the working machine, and try starting the server again. Like this:

client $ > rsync -av root@working:/etc/httpd/conf.d/ \ /etc/httpd/conf.d/ --delete-after --progress
client $ > systemctl restart httpd
client $ > systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since DATE
Docs: man:httpd.service(8)
Process: 305059 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: YYY (code=exited, status=1/FAILURE)
Status: "Reading configuration..."
DATE client systemd[1]: Starting The Apache HTTP Server...
DATE client httpd[305059]: AH00526:
Syntax error on line 18 of /etc/httpd/conf.d/ssl.conf:
DATE client httpd[305059]: Invalid command 'SSLPassPhraseDialog', perhaps misspelled or defined by a module not included in the server configuration
DATE client systemd[1]: httpd.service:
Main process exited, code=exited, status=1/FAILURE
DATE client systemd[1]: httpd.service:
Failed with result 'exit-code'.
DATE client systemd[1]:
Failed to start The Apache HTTP Server.

As usual, I have highlighted above what I consider interesting. It looks like I need to add support to ssh to go ahead. I do it and try again:

client $ > yum install mod_ssl

Now restart and I can have my default HTTP Server Test Page. Time to fill up the apache server!

Leave a comment