Zyngalu: Point to USB
Index | Home Server | My Hardware | Youtube Channel Art | Feedback | Mount USB Drive | Shut Down Pi | Forums

Point to the Raspberry Pi USB Drive

Get Apache to point to another Drive so you can serve your wesite from a USB drive

Goto

cd /etc/apache2/sites-available

There you will find these two files. Each needs to be edited.

ls 000-default.conf  default-ssl.conf

Open

sudo nano 000-default.conf

Find

DocumentRoot /var/www/html

And Change to

DocumentRoot /mnt/usb

Save Ctrl + o

Open

sudo nano default-ssl.conf

Find

DocumentRoot /var/www/html

Change to

DocumentRoot /var/mnt/usb

Save Ctrl + o

Open apache2.conf

sudo nano /etc/apache2/apache2.conf

Find

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

Change to

<Directory /mnt/usb/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

Restart Apache

sudo /etc/init.d/apache2 restart