12) Configure Apache to use the USB Drive

<-- Previous    Next –>

If you have installed a USB Drive, you will want to point your Apache server to use a folder on that USB Drive.

So instead of the default location of /var/www you want the configured server to point to /websites/www.

The Apache document root was set by default to /var/www/html.  It was configured in the following file:


So type in:

sudo nano /etc/apache2/sites-available/000-default.conf

and change the following line to what you want, in my case is /websites/www/html:

DocumentRoot /var/www/html

Also do a:

sudo nano /etc/apache2/apache2.conf

and find this

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted

and change /var/www/ to your preferred directory which in my case is:


and save it by pressing Ctrl+ X and Y and return key.

After you saved your changes, just restart the Apache webserver.

sudo service apache2 restart

<-- Previous    Next –>