SUSE Conversations


Chroot Apache



By: DamianMyerscough

March 28, 2008 5:55 am

Reads:141

Comments:0

Rating:0

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

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Tags: , ,
Categories: Enterprise Linux, Technical Solutions

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.

Comment

RSS