using (Setting up a local web server on macOS 10.14 “Mojave”)
I followed the steps posted by "etresoft" on my MacBook Pro running macOS Mojave Version 10.14.6, but the configuration failed!
$ apachectl configtest
AH00557: httpd: apr_sockaddr_info_get() failed for KAPAMACT3B5HTD5
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
(2)No such file or directory: AH02291: Cannot access directory '/private/var/log/apache2/' for main error log
AH00014: Configuration check failed
p2725316 at KAPAMACT3B5HTD5 in /etc/apache2
MacBook Pro 15", 10.13