skip to Main Content

I updated my laptop from Mojave to Catalina last night, and this morning I realised that I had lost all my Apache vhosts, my vhost file was replaced with the default file.
I had all my vhosts in /usr/local/etc/httpd/extra/httpd-vhosts.conf

I would like to know which is the right way to do this (store my vhosts), so I (hopefully) won’t lost my vhosts in a future update.

Thanks!!

P.D. I’m using “native” Apache, not Homebrew.

3

Answers


  1. Catalina moved the root directory files as part of the upgrade. See https://apple.stackexchange.com/questions/371852/where-does-the-upgrade-to-macos-catalina-move-root-directory-files

    From the answer: This took me a long time to figure out, but any file that was formerly at, e.g., /my-cool-directory was moved to /Users/Shared/Relocated Items/Security/my-cool-directory.

    You might try checking in your /Users/Shared/Relocated Items/Security folder for your original Apache files.

    Login or Signup to reply.
  2. It depends on what you do include in your httpd.conf file.

    You can try use a custom created vhosts file eg. Include /private/etc/apache2/extra/mycustom-httpd-vhosts.conf next time.


    After the last catalina update my custom files where not moved out of their places.

    Login or Signup to reply.
  3. I had the same issue with updating to catalina. All my changes were gone.

    By default the httpd.conf includes config files in the other directory:

    Include /private/etc/apache2/other/*.conf
    

    I place my vhosts and userdir configs in this directory now. It looks like it works just fine. Another custom file I had in there was not touched by the update.

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