Steltek Web root is at "/var/www/html"
files.gallery is hosted at "/sites/files"
Just out of curiosity, why isn't your sites
dir inside the web server document root? The intended purpose is to maintain your web files inside your servers document root. For example, a typical Linux server will have /var/www/website1/public
and /var/www/website2/public
, where each domains document root is the public
dir. On my local web server (on my working laptop), I have assigned server document root to /Myname/sites
, so everything inside sites
is in the document root. Then, of course I can setup specific hostname files.test
to point to /Myname/sites/files
. Why not just assign your server document root to /sites
if all your sites are there?
Steltek Issue:
Trying to use custom.js in this scenario fails. The file is never included in the files.gallery output.
Yes, I can imagine that would fail, because the CSS file is technically outside the servers document root. The main problem here, is how are we supposed to know the public web path to the CSS document if we can't calculate the path relative to the server document root? In the specific case of Files Gallery, we can probably "assume" that the file can be loaded relative to to index.php
(since this file must be public), for example _files/custom/custom.css
... But this wouldn't work if someone has changed storage_path
option for example.
I will look into it for next release ... The above is probably a solution, although it doesn't seem flexible.