You can accomplish a bit of what you might want with FollowSymLinks
and the correct permissions on files.
This method will only create links to data where you specify, it will not give you the entire filesystem, unless you were to create symlinks for every path of course, and even then, you might run into problems with specific system paths.
By default Apache2 has FollowSymLinks
on by default, so no additional apache configuration was needed. For the sake of answering this question, I spun up an openstack instance, and did the follow steps.
I will mention, I would have assumed more would be needed as far as setting permissions, actually kind of scary.
Maybe root having a running instance of apache2 makes it work? I don't think www-data would have access to /home/ubuntu by default. Strange.
ubuntu@test:/home/ubuntu# sudo su
root@test:/home/ubuntu# apt-get install apache2
root@test:/home/ubuntu# ps awux | grep apache2
root 30862 0.0 0.1 71300 2572 ? Ss 12:17 0:00 /usr/sbin/apache2 -k start
www-data 30865 0.0 0.2 360464 4252 ? Sl 12:17 0:00 /usr/sbin/apache2 -k start
www-data 30866 0.0 0.2 557344 5024 ? Sl 12:17 0:00 /usr/sbin/apache2 -k start
root@test:/home/ubuntu# cd /var/www/html/
root@test:/var/www/html# ls
index.html
root@test:/var/www/html# ln -s /tmp tmp-symlink
index.html tmp-symlink
root@test:/var/www/html# cd tmp-symlink
root@test:/var/www/html/tmp-symlink# ls
hsperfdata_ubuntu
root@test:/var/www/html# ln -s /home/ubuntu/ ubuntu-user
root@test:/var/www/html# cd /home/ubuntu/
root@test:/home/ubuntu# ls
file test test_directory test.sh
FollowSymLinks
you should be able to do what you need to, without it being 'stupid'./
as root./etc/shadow
?