0

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.

7
  • and why not using a bind mount?
    – djdomi
    May 24, 2022 at 11:05
  • thanks. first time bind mount. works great
    – potato
    May 24, 2022 at 14:27
  • so already solved?
    – djdomi
    May 24, 2022 at 18:02
  • yes. but used symlinks at the end
    – potato
    May 24, 2022 at 21:09
  • mount --bind /from /to should not be sich hard?
    – djdomi
    May 25, 2022 at 16:50

0

You must log in to answer this question.

Browse other questions tagged .