stop nginx and start apache mac code example Example 1: stop nginx mac brew services stop nginx Example 2: start nginx mac brew services start nginx