skip to Main Content

After I upgraded php 7.1 to 7.2 I can no longer restart Apache. I tried to upgrade it with homebrew following the instructions on the web and I think I did something wrong.

php -v
PHP 7.2.15 (cli) (built: Feb 26 2019 10:43:45) ( NTS )

shows that i have it.

When I try to restart Apache it throws the errors shown below:

sudo apachectl restart

AH00112: Warning: DocumentRoot
[/usr/local/opt/httpd/docs/dummy-host.example.com] does not exist

AH00112: Warning: DocumentRoot
[/usr/local/opt/httpd/docs/dummy-host2.example.com] does not exist

AH00526: Syntax error on line 144 of
/usr/local/etc/httpd/extra/httpd-ssl.conf:

SSLCertificateFile: file ‘/usr/local/etc/httpd/server.crt’ does not
exist or is empty

2

Answers


  1. It looks like something happened with your Apache config, whether it has been reset, or Apache is looking elsewhere.

    You can try apachectl -V to see where they are being loaded from.

    Additionally, I’m not a homebrew user, but it looks as if homebrew installed Apache should be evoked as httpd.

    This may help as an additional resource:

    https://joostvanveen.com/a-28/install-and-configure-apache-2-on-mojave-with-homebrew

    Login or Signup to reply.
  2. I had a similar problem with virtual hosts after a recent upgrade; I’ve temporarily fixed it by commenting out these two lines in httpd.conf:

    LoadModule vhost_alias_module lib/httpd/modules/mod_vhost_alias.so
    Include /usr/local/etc/httpd/extra/httpd-vhosts.conf
    

    That got things working for me, as I can live without vhosts and needed a quick fix.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search