Ok, after update macOS from High Sierra to Mojave, Apache with PHP stop working properly, so I did everything as is said in this guide - https://getgrav.org/blog/macos-mojav
because the topic is the httpd.conf messed up after Mojave upgrade I got also this error during sudo apachectl configtest
Could not reliably determine the server's fully qualified domain name, using XXX. Set the 'ServerName' directive globally to suppress this message
I found out the #ServerName localhost:80
in the httpd.conf was comented out, uncommenting resolved my issue.