LiteSpeed chroot setup

Discussion in 'Install/Configuration' started by zoom, Dec 5, 2005.

  1. zoom

    zoom Well-Known Member

    During the installation of the pro version I requested "chroot" to be setup. The installation requests the path of the chroot'd environment to be absolute and it must include the server install path as well. I've setup a chroot directory /chroot with /opt/lsws under it as well. However, when I enter my absolute path of /chroot it keeps prompting me again and again. I didn't see anything in the documentation about chroot setup for LiteSpeed, could someone give me some guidance?? please???

    Thanks in advance.
  2. mistwang

    mistwang LiteSpeed Staff

    The LSWS must be installed and run inside the chroot jail. I guess you should do as follow:

    # mkdir -p /chroot/opt/lsws

    # ./


    server root: /chroot/opt/lsws
    chroot path: /chroot
  3. zoom

    zoom Well-Known Member

    Thanks mistwang,
    I was able to get it installed correctly into the chroot'd directory. Having some problems getting it to execute the lsphp fastcgi binary. I checked to see what shared libs it might be using and put those into the chroot'd area as well, still no luck. Does it require some additional libs???

    ldd lsphp reports the following libs are needed by lsphp.

    Error in the stderr.log:

    lsphp: error while loading shared libraries: cannot open shared object file: No such file or directory
  4. mistwang

    mistwang LiteSpeed Staff

    please run "lsws/admin/misc/ /chroot/ /chroot/opt/lsws/fcgi-bin/lsphp", should fix the missing library for you. or you can do "cp /lib/ /chroot/lib/".
  5. zoom

    zoom Well-Known Member

    That did the trick. PHP seems to work perfectly now in the chroot'd environment.

    I do have one general question to ask though. If I wish to run in a chroot'd environment I assume that would require me to run any additional services within the chroot'd environment ie: MySQL, Perl, Python or Ruby correct??

    Thanks again mistwang for all your help. Much Appreciated.
  6. mistwang

    mistwang LiteSpeed Staff

    You are welcome. :)

    For Perl, Python or Ruby, you have to copy all related executable and binary into the jail,
    For MySQL, you can run it either inside or outside the jail, you can point the MySQL server socket to a path inside the jail like /chroot/tmp/mysql.sock, for applications inside the jail, they can access mysql via socket /tmp/mysql.sock, or, just use the TCP server socket

Share This Page