Modify DocumentRoot in Apache (Mac)
After you've installed Apache with Homebrew on macOS , you might want to change the DocumentRoot which points to the directory where your website resources reside (e.g. HTML, CSS, images). By default, DocumentRoot is located in /usr/local/var/www 1 . Here are the steps to follow to change DocumentRoot to map to a custom directory path: Place your website folder to the desired place. For example: /usr/local/var/www/my_website Open the file /usr/local/etc/httpd/httpd.conf with your favorite editor, search for DocumentRoot , and modify the following line by substituting your directory path within the double quotes: DocumentRoot "/your/directory/path" Also change the next line: <Directory "/your/directory/path"> Restart your Apache server (if you want Apache to restart at login): $ sudo brew services restart httpd or if you don't want Apache to run as a background service: $ sudo apachectl restart Test the changes to DocumentRo...