Traditional chrooting
Chrooting the Apache process can be a tedious and error-prone process. The reason for this is that once the root directory changes, Apache still expects to find all the normal supporting libraries and other required files in their regular locations. If anything is missing, Apache will not start up, or will function abnormally.
Putting Apache in a chroot jail the traditional way (without the help of ModSecurity) involves at least the following steps:
Finding out which supporting library files Apache requires
Creating the proper directory structure inside the jail
Copying all needed library files to the chroot jail, making sure everything ends up in the right directory
Making sure the Apache configuration file, module files, and any other supporting files needed are available inside the jail
Setting up user accounts for Apache inside the jail
Finding out which files are needed by supporting modules (such as
mod_php
) and putting them inside the jail
All of the above takes patience...