I'm running nginx, PHP-FPM and MySQL on Debian Wheezy. I've set up chroot jails (with
debootstrap) for each individual virtual host in
/srv/. Everything is working like one would expect, but after each reboot I had to manually
mount --bind /proc /srv/chrootjail/proc and
mount --bind /run/mysqld /srv/chrootjail/run/mysqld.
This is why I added the following lines to
/proc /srv/chrootjail/proc none rw,bind 0 0 /run/mysqld /srv/chrootjail/run/mysqld none rw,bind 0 0
/srv/chrootjail/proc gets mounted properly, but
/srv/chrootjail/run/mysqld does not and I can't find the reason why.
/srv/chrootjail/run/mysqld just remains empty, although there are files in
mount -a fixes the problem. For obvious reasons this is not the solution I was hoping for.
Does anyone see what I'm doing wrong here?