Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

HI, I am not familiar with setting up servers. I want to set up the document root to point to another directory. This is not mod rewrite for URL's that I am trying to do.

Is it a httpd.conf file or a .htaccess that I need to create? and what is the code to do it??

share|improve this question

migrated from Dec 8 '10 at 1:19

This question came from our site for professional and enthusiast programmers.

  1. In apache\conf\httpd.conf file, find and change the DocumentRoot property, such as:

    DocumentRoot "C:/apache/htdocs"

  2. Restart your apache server.

share|improve this answer
The document root says <Directory "/var/www/html"> In the godaddy control panel it says that the document root that I want to change to should be:/home/myusername/public_html. Do I change it to: /var/www/html/home/myusername/public_html – Anonymous Dec 7 '10 at 21:59
No, I think it should be /home/myusername/public_html/ – LAS_VEGAS Dec 7 '10 at 22:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.