Openlitespeed in docker container ?

Discussion in 'Linux Support: RHEL, CentOS, SUSE etc' started by wanah, Jul 20, 2014.

  1. wanah

    wanah New Member

  2. lswave

    lswave Member

    probably no.

    there is no "daemon off" like option in openlitespeed or litespeed enterprise -- never heard of it so far.

    regarding "daemon off" mode in nginx
    so it's not for production env, should be very slow.
    I don't think openlitespeed will support this mode in near future.
  3. wanah

    wanah New Member

    I've just checked up for apache and you can set it to run in the foreground too. It would be a shame if openlitespeed was the only webserver not compatible with docker.
  4. wanah

    wanah New Member

    It's only the parent process that needs to be in the foreground, maybe there is an option that can be specified when launching the parent process from command line.
  5. wanah

    wanah New Member

    Hello again, sorry to be instant, I'm trying to determine if I need to open a feature request for this or if I'm missing something.

    echo "daemon off;" >> /etc/nginx/nginx.conf
    /usr/sbin/nginx -c /etc/nginx/nginx.conf

    /usr/sbin/apache2 -D FOREGROUND -f /path/to/config/httpd.conf

    /usr/sbin/lighttpd -D -f /path/to/config/file

    I've tried things like :
    /usr/local/lsws/bin/lswsctrl -D

    But the -D optin doesn't seem to exist, I'm wondering if there is a non documented developper mode or something to do this ?
  6. wanah

    wanah New Member

  7. lsmichael

    lsmichael Active Member

    Answered the question there. Had to consult with the developers, though. Apparently, I wasn't the only one who didn't know about this. I'll try to work it into the documentation when I get a chance.


  8. wanah

    wanah New Member

    Thanks, can't wait to give this a go ! I'm going to finish the book I'm reading about Docker first though :)
  9. roottoor

    roottoor New Member

    Hello )
    I try to run docker image with openlitespeed

    $ docker pull masolit/openlitespeed
    $ docker run -d -p 7080:7080 -p 8088:8088 masolit/openlitespeed /usr/local/lsws/bin/openlitespeed -d

    and i receive error on admin login page: Warning: fopen(/usr/local/lsws/admin/conf/htpasswd) [function.fopen]: failed to open stream: Permission denied in /usr/local/lsws/admin/ on line 127

    i try to use supervisor to run openlitespeed inside container it sometimes work sometimes not,
    if i run docker in interactive mode

    $ docker run -it -p 7080:7080 -p 8088:8088 masolit/openlitespeed bash

    and run litespeed in docker from bash everything work perfect

    i try to use supervicer it work
    i need help ) Thanks.
    Last edited: Jun 23, 2015
  10. roottoor

    roottoor New Member

    i mean sometimes it work sometimes not :(((
    somebody .... heeeelp

    i don't want switch to nginx :(
  11. Pong

    Pong Administrator

    It was a bug and has been fixed in the latest version.

    Suggest to update to latest version.

    Alternatively, just do the following:
    chown -R lsadm:lsadm /usr/local/lsws/admin/conf
    chmod -R 600 /usr/local/lsws/admin/conf
  12. roottoor

    roottoor New Member

    Thank you for your reply.
    I use latest version installed from official repo.


    same error if i run
    docker run -d -p 7080:7080 -p 8088:8088 masolit/openlitespeed /usr/local/lsws/bin/openlitespeed -d

  13. Pong

    Pong Administrator

    the conf folder should have execute permission, while file can have read and write permission.

    Add execute to conf folder and try.
    chmod 700 /usr/local/lsws/admin/conf

    bugs in repo will be fixed in next release
  14. roottoor

    roottoor New Member

    It does not help
  15. roottoor

    roottoor New Member

    somebody help.....
  16. Pong

    Pong Administrator

    could not reproduce it.
    There are a few ways to try.

    1. Please try to change the folder /usr/local/lsws/admin/conf to 777 to see how it is going. Of cause it is not the right permission mask but at least providing hint to see if it is folder permission issue.
    2. New release 1.3.12 came out. remove the old one completely and try the new one from LiteSpeed repo.

    Let us know the result.
  17. roottoor

    roottoor New Member

    does not help :(
  18. lsfoo

    lsfoo Administrator

    Hi roottoor,

    Could you provide a permissions view of /usr/local/lsws/admin/ That may be the directory that has a permissions issue.

  19. Pong

    Pong Administrator

    Did you try the new release 1.3.12 with fresh installation? ( you have to remove your existing one completely) Fresh install has been tested.

    fresh install means
    (1. back up you configure file
    2. Yum remove openlitespeed (remove your old version)
    3. rm -rf /usr/local/lsws
    4. yum install openlitespeed (install the new version)

    Not sure why your conf folder permission mask changed (/usr/local/lsws/admin/conf should have executable permission from the beginning. Fresh install should have the right permission mask. Your error message is simply a login failure since OpenLiteSpeed can not read your password file.
    If some process did make such change, we need to find out.
  20. Pong

    Pong Administrator

    also we could not reproduce your error in our lab. If the above fresh install doesn't work, please let us know the details how to reproduce it or give us your tmp root access.

Share This Page