2

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 1

-1

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
  • 1
    Although your answer is 100% correct, it might also become 100% useless if that link is moved, changed, merged into another one or the main site just disappears... :-( Therefore, please edit your answer, and copy the relevant steps from the link into your answer, thereby guaranteeing your answer for 100% of the lifetime of this site! ;-) You can always leave the link in at the bottom of your answer as a source for your material...
    – Fabby
    Nov 16, 2015 at 0:51
  • That's the official apache 2.2 online manual and it's unlikely to move or disappear any time soon.
    – johnR
    Nov 16, 2015 at 18:46
  • It's also difficult to tell the internal search to include that link into a search if you're searching here! (It doesn't and never will), therefore, please edit blah blah! ;-)
    – Fabby
    Nov 16, 2015 at 21:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .