Where is the right place to configure my Apache vhosts in OSX?

Viewed 1182

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

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.

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.

Related