Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Chroot: '/usr/sbin/nginx' No such file or directory  (Read 3911 times)

0 Members and 1 Guest are viewing this topic.

Aby

  • Guest
Chroot: '/usr/sbin/nginx' No such file or directory
« on: February 07, 2014, 02:08:55 pm »
Error: chroot: '/usr/sbin/nginx' No such file or directory

If you encounter this error when running the daemon of nginx using chroot, this is likely due to missing 64 bit libraries in the jailed environment.
If you are running chroot in /srv/http you need to add the required 64 bit libraries.
First, set up the directories (these commands will need to be run as root)

# mkdir /srv/http/usr/lib64
# cd /srv/http; ln -s usr/lib64 lib64

Then copy the required 64 bit libraries found using ldd /usr/sbin/nginx to /srv/http/usr/lib64
if run as root, permissions for the libraries should be read and executable for all users, so no modification is required.
----