Chroot Apache the simple way

Problem

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.

Solution

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.

Reference


[1] http://www.novell.com/communities/node/1518/securing+apache+web+server+mod_security

(Visited 1 times, 1 visits today)
Tags: , ,
Category: Enterprise Linux, Technical Solutions
This entry was posted Friday, 28 March, 2008 at 5:55 am
You can follow any responses to this entry via RSS.

Leave a Reply

Your email address will not be published. Required fields are marked *

No comments yet