3

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.

nmorell
  • 65
  • 6

3 Answers3

3

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.

  • try to avoid the answer by providing link. At least try to give a short hit about your answer so that your answer will reach – Agilanbu Oct 09 '19 at 12:54
  • Thanks for your answer, that link is related to user folders on the root folder, (it could be Apache or user pictures as well). Related but not really what I'm looking for. – nmorell Oct 09 '19 at 12:59
  • Thanks, I found it here: `cd /Users/Shared/Relocated\ Items/Configuration/private/etc/apache2` – Eugene Dec 17 '19 at 10:12
1

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.

André Kelling
  • 1,575
  • 16
  • 23
0

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.

morja
  • 8,297
  • 2
  • 39
  • 59