Chroot Apache | SUSE Communities

Chroot Apache


Chroot Apache the simple way


The process of chrooting the Apache web server is very tedious having to find all dependencies that Apache relies on, However, this process can be much simpler using the Apache module mod_security. The article for installing mod_security can be found at [1] website.

Please note that this process is mainly for static content i.e. No PHP/Perl/Python scripts.


The solution to this tedious problem is simple, the Apache module mod_security provides a basic chroot feature which is great if you are only serving static pages. The directive that mod_security uses is “SecChrootDir”. This directive takes a directory which the web server will be chrooted to, for example to set the chroot directory to “/srv/www” you would simple use the “SecChrootDir” directive as shown in Figure 1.

SecChrootDir /srv/www

Figure 1: Chroot Apache web server.



(Visited 1 times, 1 visits today)

Leave a Reply

Your email address will not be published.

No comments yet