diff --git a/bin/container/appinstallctl.sh b/bin/container/appinstallctl.sh index 5d8717c..e0d23eb 100644 --- a/bin/container/appinstallctl.sh +++ b/bin/container/appinstallctl.sh @@ -29,8 +29,8 @@ linechange(){ } get_owner(){ - WWW_UID=$(stat -c "%u" ${DEFAULT_VH_ROOT}/${1}) - WWW_GID=$(stat -c "%g" ${DEFAULT_VH_ROOT}/${1}) + WWW_UID=$(stat -c "%u" ${DEFAULT_VH_ROOT}) + WWW_GID=$(stat -c "%g" ${DEFAULT_VH_ROOT}) if [ ${WWW_UID} -eq 0 ] || [ ${WWW_GID} -eq 0 ]; then echo "Found ${WWW_UID}:${WWW_GID} has root, will auto fix to 1000" WWW_UID=1000 @@ -107,6 +107,7 @@ app_wordpress_dl(){ } main(){ + set_vh_docroot ${DOMAIN} get_owner cd ${VH_DOC_ROOT} if [ "${APP_NAME}" = 'wordpress' ] || [ "${APP_NAME}" = 'wp' ]; then @@ -132,7 +133,6 @@ while [ ! -z "${1}" ]; do -d | -D | -domain) shift check_input "${1}" DOMAIN="${1}" - set_vh_docroot ${DOMAIN} ;; -vhname) shift VHNAME="${1}" diff --git a/bin/setPassword.sh b/bin/setPassword.sh deleted file mode 100755 index 7cc3349..0000000 --- a/bin/setPassword.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -docker-compose exec litespeed su -s /bin/bash lsadm -c 'echo "admin:$(/usr/local/lsws/admin/fcgi-bin/admin_php* -q /usr/local/lsws/admin/misc/htpasswd.php '${1}')" > /usr/local/lsws/admin/conf/htpasswd'; - \ No newline at end of file diff --git a/bin/setwebadmin.sh b/bin/setwebadmin.sh new file mode 100755 index 0000000..f28f29c --- /dev/null +++ b/bin/setwebadmin.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +docker-compose exec litespeed su -s /bin/bash lsadm -c \ + 'echo "admin:$(/usr/local/lsws/admin/fcgi-bin/admin_php* -q $/usr/local/lsws/admin/misc/htpasswd.php '${1}')" > /usr/local/lsws/admin/conf/htpasswd'; + \ No newline at end of file diff --git a/config/litespeed/1.6.4/Dockerfile b/config/litespeed/1.6.4/Dockerfile index b39a387..5c2344b 100644 --- a/config/litespeed/1.6.4/Dockerfile +++ b/config/litespeed/1.6.4/Dockerfile @@ -6,22 +6,19 @@ RUN apt-get update && apt-get install wget curl -y RUN wget https://openlitespeed.org/preuse/openlitespeed-1.6.4.tgz && \ tar xzvf openlitespeed-1.6.4.tgz && cd openlitespeed && ./install.sh && rm -rf /openlitespeed -RUN apt-get install -y software-properties-common && \ - add-apt-repository 'deb http://ftp.debian.org/debian jessie-backports main' && \ - apt-get update && apt-get install -y python-certbot-apache -t jessie-backports - RUN apt-get install mysql-client lsphp73 lsphp73-common lsphp73-mysql lsphp73-opcache \ lsphp73-curl lsphp73-json lsphp73-imagick lsphp73-redis lsphp73-memcached -y EXPOSE 7080 RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \ - chmod +x wp-cli.phar && mv wp-cli.phar /usr/local/bin/wp && \ + chmod +x wp-cli.phar && mv wp-cli.phar /usr/bin/wp && \ ln -s /usr/local/lsws/lsphp73/bin/php7.3 /usr/bin/php + RUN rm -rf /usr/local/lsws/conf ADD conf /usr/local/lsws/conf -RUN chown 999 /usr/local/lsws/conf -R +RUN chown 999:999 /usr/local/lsws/conf -R COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/config/litespeed/1.6.4/conf/httpd_config.conf b/config/litespeed/1.6.4/conf/httpd_config.conf index 9ffbcba..bb548a6 100644 --- a/config/litespeed/1.6.4/conf/httpd_config.conf +++ b/config/litespeed/1.6.4/conf/httpd_config.conf @@ -227,9 +227,14 @@ listener HTTPS { vhTemplate centralConfigLog { templateFile conf/templates/ccl.conf - listeners HTTP + listeners Default, HTTP, HTTPS + + member localhost { + vhDomain * + } } + vhTemplate EasyRailsWithSuEXEC { templateFile conf/templates/rails.conf listeners HTTP