• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 503
  • Last Modified:

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
  • 2
1 Solution
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 ..

wahrani16Author Commented:
I have use debootstrap and installed a fresh debian  to chroot the environement.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now