Ubuntu – Include folder for certain www host outside document root folder

apache-2.2symbolic-linkUbuntu

Ubuntu 12.04, running on Apache server.
I wonder if that is possible to run/access from browser html/php file from other than document root location let's say from folder /testfolder on the root

So once I enter in browser example.com/testfolder It will be executed the same as from var/www/example.com/httpdocs/testfolder.

But files and this folder will be on the root in /testfolder not in document root (httpdocs)
I don't want to put this folder physically at all in httpdocs.
Goal is to hide those files/folder from default www vhost folder.

Best Answer

You should use a <Directory> directive and an Alias:

https://stackoverflow.com/questions/15770778/configure-apache-conf-for-alias

The directory does not have to be inside the documentroot.

Related Topic