You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wiki-changes@httpd.apache.org by Apache Wiki <wi...@apache.org> on 2006/11/27 01:13:19 UTC

[Httpd Wiki] Update of "Recipes/MovingDefaultDocRoot" by pctony

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change notification.

The following page has been changed by pctony:
http://wiki.apache.org/httpd/Recipes/MovingDefaultDocRoot

The comment on the change is:
created new page

New page:
= Moving your default DocRoot =

If you want to move your default !DocumentRoot path, there are two things you need to update.

 1. The !DocumentRoot directive
 1. The <Directory> block associated with the !DocRoot.


'''Example Old Configuration'''

For example, your old config may have looked somehting like this :

{{{
...

DocumentRoot /usr/local/apache2/htdocs

<Directory /usr/local/apache2/htdocs>
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>
...
}}}

'''Example New Configuration''' 

Now lets say you want to move the !DocRoot to ''/var/www'' you will need to update both of these.

{{{
...

DocumentRoot /var/www

<Directory /var/www>
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>
...
}}}

These steps not only apply to the main server config, but also any !VirtualHosts you may want to change.