You are looking for chroot jails
The chroot system call changes the root directory of the current and all child processes to the given path, and this is nearly always some restricted subdirectory below the real root of the filesystem. This new path is seen entirely as "/" by the process, and we refer to this restricted environment as the "jail". It's not possible to escape this jail except in very limited circumstances.
This could allow you to jail your users to a particular directory while still being able to serve their home folder with apache using virtual hosts.
This practice is often used in shared hosting.