# apache2 and httpd being run on macOS simultaneously

This is a simple post mainly for my *notes* incase I need to recapitulate what should be done to restore running of my virtually hosted websites on my laptop.

Ever since I installed `httpd` on my macOS 15.1 using **homebrew** and configured my virtual hosts on it and upon macOS updates which resulted in a restart of the laptop, my virtual hosts websites stopped working.

After many updates I found that there’s an **apache2** service also running in the background and upon going to local.myWebsite.com it was trying to detect the virtual host from Apache’s config and not the `httpd`’s one.

So I had to stop Apache2 and `httpd` and start `httpd`. Only then my virtual hosts were back running properly.

```bash
sudo apachectl stop
brew services stop httpd
brew services start httpd
```
