modsecurity chrooting apache won't start

Hi all,
I am using debian 7.0

I have created a jail in /var/chroot/apache2
I have configured this on modsecurity.conf :
SecChrootDir /var/chroot/apache2

When I try to start apache, nothing happens ...
root@web:/var/run/apache2# /etc/init.d/apache2 restart
Restarting web server: apache2.

In the log file /var/log/error.log I had these error messages :

 [Sun Oct 20 22:11:15 2013] [notice] ModSecurity: chroot checkpoint #1 (pid=1737 ppid=1731)
[Sun Oct 20 22:11:15 2013] [notice] ModSecurity for Apache/2.5.12 (http://www.modsecurity.org/) configured.
[Sun Oct 20 22:11:16 2013] [notice] ModSecurity: chroot checkpoint #2 (pid=1738 ppid=1)
[Sun Oct 20 22:11:16 2013] [notice] ModSecurity: chroot successful, path=/var/chroot/apache2
[Sun Oct 20 22:11:16 2013] [error] (2)No such file or directory: could not create /var/run/apache2.pid
[Sun Oct 20 22:11:16 2013] [error] apache2: could not log pid to file /var/run/apache2.pid
[Sun Oct 20 22:11:16 2013] [error] (2)No such file or directory: Couldn't bind unix domain socket /var/run/apache2/cgisock.173

Open in new window


Thanks for your help
wahrani16Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wahrani16Author Commented:
Is there any guide to chroot apache on a debian system with modsecurity ?
I have found this one but it's for gentoo ..

http://www.gentoo-wiki.info/Apache_chroot:_the_mod_security_way
0
wahrani16Author Commented:
I have use debootstrap and installed a fresh debian  to chroot the environement.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.