How to run apache2 in chroot jail setup

Ubuntu 14.04

I was trying to setup apache in chroot,but i can't found any related answer.

I was googling over a week but i can't get my answers

so some one please help me.....

Thanks in advance

1 Answer

Apache >= 2.2.10 has built in chroot support. See the ChrootDir directive in the Apache docs:

Description: Directory for apache to run chroot(8) after startup.
Syntax: ChrootDir /path/to/directory
Default: none
Context: server config
Status: MPM
Module: event, prefork, worker
Compatibility: Available in Apache 2.2.10 and later

This directive tells the server to chroot(8) to the specified directory after startup, but before accepting requests.

Note that running the server under chroot is not simple, and requires additional setup, particularly if you are running scripts such as CGI or PHP. Please make sure you are properly familiar with the operation of chroot before attempting to use this feature.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like