How to change document root in ubuntu 14.04 [Linux].

Stan Lee. December 27, 2015 Comments

In Ubuntu the Apache configuration is located at /etc/apache2. There should be two folders, sites-available and sites-enabled. Inside sites-enabled are symlinks to config files in sites-available.

You simply have to change the document root in your activated configuration. Thats probably/etc/apache2/sites-enabled/000-default

Have a look for DocumentRoot and change it to /var/www/new, then reload your apache.

 

And also make changes in apache conf file in /etc/apache2/apache2.conf.

Exist


    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted

Need to add

/var/www/new>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted

  • ubuntu
  • document-root