Is there any way to allow multiple virtual hosts on one server (apache2 on ubuntu 16.40) to serve files from a directory that is above or adjacent to the virtual host's DocumentRoot?
On my server I have the following directories where site_one, and site_two are the document roots.
websites/site_one
websites/site_two
websites/shared_files/images
websites/shared_files/js
I would like to point http://site_one.com/images/
to shared_files/images/
I tried adding RewriteRule ^images/(.*)$ ../shared_files/images/$1
to my .htaccess which produced a 400 bad request error. Adding Alias "/images" "../shared_files/images"
to sites-enabled/site_one.com.conf resulted in a 403 forbidden error.
I can access files with php using either include('../shared_files/file.php)
or simply chdir(../shared_files/)
but I would prefer not to load images and other static files that way.