This page explains how to point your Apache server to a USB drive on your Raspberry Pi assuming that you have mounted the USB drive to the directory /websites on the Raspberry Pi as described on a previous page.
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:
and change the following line to what you want, in my case to /websites/www/html:
and save it by pressing Ctrl+ X and Y and return key.
Also do a:
and find this
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
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.
To do a test, you will need to create a test file in the /websites/www/html/ directory and run it from a web browser.