Liz Banach Liz Banach - 2 months ago 30
Apache Configuration Question

Virtual hosts not working with install of macOS Sierra

I recently updated my work machine to macOS Sierra and now none of my virtual host configurations are working. I need to reconfigure all of these which is a huge pain.

I am wondering - is it normal for this to happen? Is there a way to prevent this from happening in the future when I update my operating system?

Additionally, it appears that my virtual host configuration is not working. Please see below.

I have edited

to include:

<VirtualHost *:80>
DocumentRoot "/Users/splashnw/Sites/tm-charts"
ErrorLog "/private/var/log/apache2/"
CustomLog "/private/var/log/apache2/" common

And, my
file has:

When I navigate to in my browser, there is simply a message: "It works!" Not my project that I originally saw at that URL prior to installing macOS Sierra.

Can you tell me what is going wrong here? Thank you!


When you updated to macOS it overwrote your "httpd.conf" file in the /etc/apache2/ folder. It also overwrote your "http-vhost.conf" file as well in the /etc/apache2/extra folder.

You need to see if you have a backup file in those directories to uncomment the lines or use this as an example to help restore your settings:

Check both the "/etc/apache2" and "/etc/apache2/extra" folder for the http-conf~previous and http-vhost.conf~previous files to put your previous settings back

When you are done be sure to run sudo apachectl restart for the new settings to take effect.