Openlitespeed in docker container ?

#3
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
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
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.

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

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

Lighttpd
/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 ?
 

lsmichael

Active Member
#7
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.

Cheers,

m
 
#9
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/html.open/classes/ows/CLIENT.php 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:

Pong

Administrator
#11
Warning: fopen(/usr/local/lsws/admin/conf/htpasswd) [function.fopen]: failed to open stream: Permission denied in /usr/local/lsws/admin/html.open/classes/ows/CLIENT.php on line 127
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
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

:cry:
 

Pong

Administrator
#13
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
 

Pong

Administrator
#16
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.
 

lsfoo

Administrator
#18
Hi roottoor,

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

Thanks,
Kevin
 

Pong

Administrator
#19
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.
 

Pong

Administrator
#20
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.
 
Top