Tag Archives: mac change document root apache

Changing Document Root of Apache on mac OS (10.8)

11 Apr
  1. Go to /etc/private/httpd.conf
  2. sudo vim httpd.conf (Cannot edit in Readonly mode)
  3. Type /DocumentRoot to find Document Root in the file
  4. Change the file path to what you need
  5. save the file by :wq if you have vim
  6. sudo apachectl restart
  7. Go to localhost/index.html or any file on the given path