My apache DocumentRoot folder is $HOME/MyProject/src
. Large external disc is mounted on a server on /storage
path.
I have a bunch of rewrite rules set on in apache .conf
. For example:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/api/media/(.*) /data/$1 [L]
With the new external disc in place, rewrite rule should point to actual absolute path on /storage/myproject/data/$1
, which is not in the DocumentRoot
path.
I want to use the storage space of external disc for media files. I cannot use the default disc where source code is, because it is too small. What is my best option? Surely this doesn't mean moving source and DocumentRoot to slow HDD external storage.
mount --bind /from /to
should not be sich hard?