- Go to /etc/private/httpd.conf
- sudo vim httpd.conf (Cannot edit in Readonly mode)
- Type /DocumentRoot to find Document Root in the file
- Change the file path to what you need
- save the file by :wq if you have vim
- sudo apachectl restart
- Go to localhost/index.html or any file on the given path
Tag Archives: mac change document root apache