I have two domains that share a directory (example: / img) so as not to duplicate that directory I have created an alias with the apache:
Alias / img /dominio_1.com/img/ ....
from the browser I access the img directory without problems
www.dominio_2.com/img/imagen.jpg
but from php I can not access that file
$img = file_get_contents('/img/imagen.jpg');
Warning ... failed to open stream: No such file or directory
I guess it will be a matter of permits, but I still have not found a solution