GithubHelp home page GithubHelp logo

litespeedtech / ols-docker-env Goto Github PK

View Code? Open in Web Editor NEW
182.0 13.0 121.0 185 KB

OpenLiteSpeed Docker Environment

License: MIT License

Shell 100.00%
docker-image docker openlitespeed wordpress docker-compose

ols-docker-env's Introduction

OpenLiteSpeed WordPress Docker Container

Build Status docker pulls

Install a lightweight WordPress container with OpenLiteSpeed Edge or Stable version based on Ubuntu 22.04 Linux.

Prerequisites

  1. Install Docker
  2. Install Docker Compose

Configuration

Edit the .env file to update the demo site domain, default MySQL user, and password. Feel free to check Docker hub Tag page if you want to update default openlitespeed and php versions.

Installation

Clone this repository or copy the files from this repository into a new folder:

git clone https://github.com/litespeedtech/ols-docker-env.git

Open a terminal, cd to the folder in which docker compose.yml is saved, and run:

docker compose up

Note: If you wish to run a single web server container, please see the usage method here.

Components

The docker image installs the following packages on your system:

Component Version
Linux Ubuntu 22.04
OpenLiteSpeed Latest version
MariaDB Stable version: 10.5
PHP Latest version
LiteSpeed Cache Latest from WordPress.org
ACME Latest from ACME official
WordPress Latest from WordPress
phpMyAdmin Latest from dockerhub
Redis Latest from dockerhub

Data Structure

Cloned project

├── acme
├── bin
│   └── container
├── data
│   └── db
├── logs
│   ├── access.log
│   ├── error.log
│   ├── lsrestart.log
│   └── stderr.log
├── lsws
│   ├── admin-conf
│   └── conf
├── sites
│   └── localhost
├── LICENSE
├── README.md
└── docker-compose.yml
  • acme contains all applied certificates from Lets Encrypt

  • bin contains multiple CLI scripts to allow you add or delete virtual hosts, install applications, upgrade, etc

  • data stores the MySQL database

  • logs contains all of the web server logs and virtual host access logs

  • lsws contains all web server configuration files

  • sites contains the document roots (the WordPress application will install here)

Usage

Starting a Container

Start the container with the up or start methods:

docker compose up

You can run with daemon mode, like so:

docker compose up -d

The container is now built and running.

Stopping a Container

docker compose stop

Removing Containers

To stop and remove all containers, use the down command:

docker compose down

Setting the WebAdmin Password

We strongly recommend you set your personal password right away.

bash bin/webadmin.sh my_password

Starting a Demo Site

After running the following command, you should be able to access the WordPress installation with the configured domain. By default the domain is http://localhost.

bash bin/demosite.sh

Creating a Domain and Virtual Host

bash bin/domain.sh [-A, --add] example.com

Please ignore SSL certificate warnings from the server. They happen if you haven't applied the certificate.

Deleting a Domain and Virtual Host

bash bin/domain.sh [-D, --del] example.com

Creating a Database

You can either automatically generate the user, password, and database names, or specify them. Use the following to auto generate:

bash bin/database.sh [-D, --domain] example.com

Use this command to specify your own names, substituting user_name, my_password, and database_name with your preferred values:

bash bin/database.sh [-D, --domain] example.com [-U, --user] USER_NAME [-P, --password] MY_PASS [-DB, --database] DATABASE_NAME

Installing a WordPress Site

To preconfigure the wp-config file, run the database.sh script for your domain, before you use the following command to install WordPress:

./bin/appinstall.sh [-A, --app] wordpress [-D, --domain] example.com

Connecting to Redis

Go to WordPress > LSCache Plugin > Cache > Object, select Redis method and input redis to the Host field.

Install ACME

We need to run the ACME installation command the first time only. With email notification:

./bin/acme.sh [-I, --install] [-E, --email] EMAIL_ADDR

Applying a Let's Encrypt Certificate

Use the root domain in this command, and it will check for a certificate and automatically apply one with and without www:

./bin/acme.sh [-D, --domain] example.com

Other parameters:

  • [-r, --renew]: Renew a specific domain with -D or --domain parameter if posibile. To force renew, use -f parameter.

  • [-R, --renew-all]: Renew all domains if possible. To force renew, use -f parameter.

  • [-f, -F, --force]: Force renew for a specific domain or all domains.

  • [-v, --revoke]: Revoke a domain.

  • [-V, --remove]: Remove a domain.

Update Web Server

To upgrade the web server to latest stable version, run the following:

bash bin/webadmin.sh [-U, --upgrade]

Apply OWASP ModSecurity

Enable OWASP mod_secure on the web server:

bash bin/webadmin.sh [-M, --mod-secure] enable

Disable OWASP mod_secure on the web server:

bash bin/webadmin.sh [-M, --mod-secure] disable

Please ignore ModSecurity warnings from the server. They happen if some of the rules are not supported by the server.

Accessing the Database

After installation, you can use phpMyAdmin to access the database by visiting http://127.0.0.1:8080 or https://127.0.0.1:8443. The default username is root, and the password is the same as the one you supplied in the .env file.

Customization

If you want to customize the image by adding some packages, e.g. lsphp80-pspell, just extend it with a Dockerfile.

  1. We can create a custom folder and a custom/Dockerfile file under the main project.
  2. Add the following example code to Dockerfile under the custom folder
FROM litespeedtech/openlitespeed:latest
RUN apt-get update && apt-get install lsphp80-pspell -y
  1. Add build: ./custom line under the "image: litespeedtech" of docker-composefile. So it will looks like this
  litespeed:
    image: litespeedtech/openlitespeed:${OLS_VERSION}-${PHP_VERSION}
    build: ./custom
  1. Build and start it with command:
docker compose up --build

Support & Feedback

If you still have a question after using OpenLiteSpeed Docker, you have a few options.

Pull requests are always welcome

ols-docker-env's People

Contributors

code-egg avatar ducun avatar heathchyi avatar lars-hagen avatar litespeedtech avatar psavva avatar tynanbe avatar worino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ols-docker-env's Issues

Complex password for mysql

Hello,
seems a complex password with special characters for mysql trow error.
my .env line 5 has:
MYSQL_ROOT_PASSWORD=g3qqET9&BZZoJdP4t3Wq

bash bin/database.sh -D domain.io
.env: line 5: BZZoJdP4t3Wq: command not found

I changed the password to
MYSQL_ROOT_PASSWORD=g3qqET9
All work as expected.

404 Not Found nginx

I ran the demosite.sh as per https://www.youtube.com/watch?v=S16spQxajas&feature=youtu.be, but once created, and I visit "localhost" I get a 404:

https://localhost/
image

I can access LiteSpeed WebAdmin at https://localhost:7080/ though.

CONTAINER ID        IMAGE                                        COMMAND                  CREATED             STATUS              PORTS                                                                                    NAMES
bd81448c764d        litespeedtech/openlitespeed:1.6.15-lsphp74   "/entrypoint.sh"         19 minutes ago      Up 10 minutes       0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:7080->7080/tcp, 0.0.0.0:443->443/udp   litespeed-docker_litespeed_1
232dfe161ae6        mariadb:10.3.17                              "docker-entrypoint.s…"   19 minutes ago      Up 10 minutes       0.0.0.0:3306->3306/tcp                                                                   litespeed-docker_mysql_1
02f4189df59e        bitnami/phpmyadmin:5.0.2-debian-10-r72       "/app-entrypoint.sh …"   19 minutes ago      Up 10 minutes       0.0.0.0:8080->80/tcp, 0.0.0.0:8443->443/tcp                                              litespeed-docker_phpmyadmin_1

How to get 1.7.9-lsphp80 ?

ERROR: manifest for litespeedtech/openlitespeed:1.7.8-lsphp80 not found: manifest unknown: manifest unknown

hub.docker.com/r/litespeedtech/openlitespeed/tags
Latest image is 1.6.20-lsphp74 but latest server is V1.7.9 Stable.

SSH?

Hello!
Thank you for this setup!

But I can't ssh into the container. SSH isn't installed by default when running docker-compose. And when I install it manually on the running container and try then to login I get the "ssh_exchange_identification: Connection closed by remote host" message.

How can I login into both of the containers (litespeed and mysql) via SSH? I need especially the SSH login into the mysql container to be able to access the database via Datagrip (which is much better than PhpMyAdmin).

prestashop deployment

Hi guys,

Hope you are all well !

I was wondering if it would be possible to have a docker-compose with ols+prestashop configured because I would like to test your Prestashop module and get a preview of the performances provided by ols.

Do you have any comparison/benchmarks of ols vs varnish or redis cache ?

Thanks for any insights or inputs on these questions.

Cheers,
Luc Michalski

docker-compose up

Pulling mysql (mariadb:10.3.17)...
10.3.17: Pulling from library/mariadb
ERROR: no matching manifest for linux/arm/v7 in the manifest list entries

OLS version 1.6.12

@Code-Egg latest version is now 1.6.12, is there a way to automate this?

Thanks for the container it works really well now. I use it as a webserver and reverse proxy however using other docker containers such as wordpress or php that use FastCGI I can't find out how to set the DOCUMENT_ROOT or SCRIPT_FILENAME variables. The crux of the issue that the file path is different for say the php container and the OLS container.

Create Database script returning DB Access Failed reporting error on fresh install

So I'm setting up a fresh WP host on AWS Lightsail using Ubuntu 18.04 with this repo.

Version info:

  • Lightspeed Version: 1.6.13
  • PHP: tlsphp74
  • Docker version: 19.03.12, build 48a66213fe
  • Docker-compose version: 1.26.0, build d445165

This is a default setup after cloning this repo, and editing the .env files and changing the passwords.

After that I ran docker-compose up -d, everything worked as advertised, and I verified this using a index.php file in the localhost site.

When I look to create a new domain, when I try to create a new database, I get a DB Access failed error.

Debugging in the shell scripts a bit, I found the issue in this line:

docker-compose exec mysql su -c "mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e 'status'" >/dev/null 2>&1

Line 83 is checking for a response to the previous command, but it looks like due to the suppression to the output to /dev/null in the Line 82, no output/response is being captured, and the check fails.

When I removed the >/dev/null 2>&1 part, I'm getting the status output of the command in the output and the rest of the database creation works as advertised.

I think this check needs to be done a bit differently to properly check for MySQL output.

The commands in the documentation don't work

I'm following the tutorial provided to create wordpress with litespeed and docker with my own domain.

When I get to the commands to add my domain, it just returns this:
OPTIONS -D, --domain [DOMAIN_NAME] Example: database.sh -D example.com Will auto generate Database/username/password for the domain -D, --domain [DOMAIN_NAME] -U, --user [xxx] -P, --password [xxx] -DB, --database [xxx] Example: database.sh -D example.com -U USERNAME -P PASSWORD -DB DATABASENAME Will create Database/username/password by given -H, --help Display help and exit.

Any idea?

A Quick appreciation

This is a beautiful piece of code you have written,
I just want to appreciate the simplicity. I have just started the back-end of web development.

Setup SSL is not working

I have tried with command: ./bin/acme.sh [-D, --domain] example.com to setup SSL. I have successfully set up but site is not working.

Can you see:

CleanShot 2023-02-22 at 22 15 47@2x

CleanShot 2023-02-22 at 22 16 20@2x

ssl for ports 8443 and 7080

I followed installation instruction, but I couldn't figure out how enable ssl for ports 8443 and 7080. Could you complete the instruction?

php.ini

Php settings are located in:
/usr/local/lsws/lsphp80/etc/php/8.0/litespeed/

Instead of exposed /lsws/admin-conf/php.ini

Docker error message: "ols_litespeed_1 exited with code 1"

Been running ols-docker-env on a DigitalOcean VPS for a few days without problem.

Today avec restarting the VPS, I was not able to run the OLS service anymore. Running docker-compose up, I see that ols_litespeed_1 keeps exiting, issuing error message "ols_litespeed_1 exited with code 1", after a random number of "litespeed_1 | WordPress installation finished." messages.

I see that mysql_1 is running just fine, and I can access Adminer on port 8080. But not litespeed ports (80, 443, 7080). My browser returns ERR_CONNECTION_REFUSED on ports 80 & 443, ERR_CONNECTION_TIME_OUT on port 7080...

I tried docker-compose pull, docker-compose up --build, but no luck.

Any help would be really welcome!

How to connect to an External Database

Hi,

Is it possible to connect to an External Database?

I'd like to use External Database for Wordpress but keep failing. "Error establishing a database connection"

in the wp-config.php, I tried 127.0.0.1:3307 (Yes, the Port is 3307)

Thank you.

Access site without port number in the URL

Hi again! :)
I am trying to setup a site in a way that I can access it just by "https://docker.openlitespeed". But when I add this to my local Apache's configs:

<VirtualHost docker.openlitespeed:80>
        RequestHeader set X-Forwarded-Proto "http"
        ProxyPreserveHost On
        ProxyRequests Off
        ServerName docker.openlitespeed
        ServerAlias www.docker.openlitespeed
        ProxyPass / http://localhost:10013/
        ProxyPassReverse / http://localhost:10013/
</VirtualHost>

<VirtualHost docker.openlitespeed:443>
    RequestHeader set X-Forwarded-Proto "https"
    ProxyPreserveHost On
    ProxyRequests Off
    ServerName docker.openlitespeed
    ServerAlias www.docker.openlitespeed
    ProxyPass / http://localhost:10014/
    ProxyPassReverse / http://localhost:10014/
</VirtualHost>

... then the http proxy redirect works fine. But when accessing the site with https:// then I get a too many redirects error.

Couldn't find any solutions on the web or in the forum :(

Any Idea how to set the Openlitespeed configs to handle https requests without redirect loops?

Installing python-certbot-apache will bring the dependencies of apache2

Installing python-certbot-apache will install some packages related to apache2.
We are using OLS. There is no need to install apache2 packages, which will make the image bloated.

You should consider using other Let's Encrypt tools to implement automatic SSL certificate distribution.

Changing the webadmin password does not work

Hi,

Using webadmin.sh does not change the password

./bin/webadmin.sh newpassword

cat /usr/local/lsws/admin/conf/htpasswd
admin:
Parse error: syntax error, unexpected '{' in /usr/local/lsws/admin/fcgi-bin/admin_php.bak on line 2030

The fix is to remove the * from the line 64 in webadmin.sh as it picksup a bak file

'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';

Scripts fail due to breaking docker compose change

Docker-Compose has moved to a plugin, which is called via 'docker compose' and will no longer recognize 'docker-compose', so most of your scripts fail.

Edit: Previously suggested solution doesn't work. Doesn't matter as I can't seem to get a functional site regardless using the provided scripts. Even when replacing the docker-compose commands in the scripts, it still fails with this in the logs:

"2022-10-25 13:53:43 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'unauthenticated' host: '172.22.0.3' (This connection closed normally without authentication)"

It never actually connects to the DB.

phpmyadmin looping error on Mac M1

I have encountered a "looping error" after using docker-compose up. This is occurring on a Mac M1 system.

Looping Error:

phpmyadmin_1  | Welcome to the Bitnami phpmyadmin container
phpmyadmin_1  | Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-phpmyadmin
phpmyadmin_1  | Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-phpmyadmin/issues
phpmyadmin_1  | 
phpmyadmin_1  | INFO  ==> Starting gosu... 
phpmyadmin_1  | [Thu May 27 10:47:53.773401 2021] [core:emerg] [pid 81] (95)Operation not supported: AH00023: Couldn't create the mpm-accept mutex 
phpmyadmin_1  | (95)Operation not supported: could not create accept mutex
phpmyadmin_1  | AH00015: Unable to open logs
phpmyadmin_1 exited with code 1```





Multi tenant VPS

Hi, what would be the recommended route to setup a multi tenant VPS, with process separation at user level?
I would also need it reverse proxy an Elastic Search and a Node.js instance on the same server.
Is it possible with this repo?

Setting up a OLS site in Dockerfile

When setting up OLS site through docker/compose, am I required to add any configuration/run any specific OLS commands, apart from copying my site into sites/name/html/?

Change default location of the index.php

Hello guys,

I am trying to run an existing bedrock wordpress project using this docker configuration. That means, the index.php is not located on the root of the project but src/web/index.php.

I am wondering if it is possible to change it?

I added this configuration to the .htaccess but it is not working:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^benchmark.test$ [NC,OR]
RewriteCond %{REQUEST_URI} !src/web/
RewriteRule (.*) src/web/$1 [L]

benchmark.test is my local domain. Is it the right place? 🤔

Thanks in advance!

Change max_upload_filesize PHP not work

hi, I go to file php.ini in folder lsws/admin-conf/ on host machine which is volume of ols
I changed it and edit it, then I tried to run
docker-compose exec litespeed su -c '/usr/local/lsws/bin/lswsctrl restart >/dev/null'
to restart ols
Finanlly I still can't upload file more than too 2MB to wp.

Where can I edit php.ini? How can restart the php?
I tried to kill lsphp in container litespeed but command not work....

killall -9 lsphp
lsphp: no process found

Hope you can help me find this out.

Problem with installation of litespeed-cache.zip plugin during wordpress app installation through appinstall.sh

Every time when I run this command (on any domain)

$ ols-docker-env % bin/appinstall.sh -A wordpress -D test.localhost

I get following error:

Set owner to 1000 Install unzip package.. /usr/local/bin/appinstallctl.sh: line 116: unzip: command not found /usr/local/bin/appinstallctl.sh: line 151: /var/www/vhosts/test.localhost/html/wp-content/plugins/litespeed-cache/data/const.default.ini: No such file or directory Install ed package..

The result is that LiteSpeed Cache plugin is not installed and configured properly. How can I fix it?
I run docker on MacOs.

restart: always for mysql & phpmyadmin

Not sure if there is a reason for this but should the the mysql and phpmyadmin services have a restart policy added so that they restart on server reboot per the litespeed service?

Errors occur when running docker-compose up

When I run docker-compose up, these errors occur:

ERROR: for 8e936524d694_ols-docker-env_litespeed_1 Cannot start service litespeed: Bind mount failed: '/ols-docker-env/lsws/conf' does not exists

ERROR: for litespeed Cannot start service litespeed: Bind mount failed: '/ols-docker-env/lsws/conf' does not exists
ERROR: Encountered errors while bringing up the project.

server certificate does NOT include an ID which matches the server name

I'm getting this error when I do "docker-compose up"

phpmyadmin_1  | [Sun Dec 06 16:47:22.570518 2020] [ssl:warn] [pid 64] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
phpmyadmin_1  | [Sun Dec 06 16:47:22.572050 2020] [ssl:warn] [pid 64] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
phpmyadmin_1  | [Sun Dec 06 16:47:22.605294 2020] [ssl:warn] [pid 64] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
phpmyadmin_1  | [Sun Dec 06 16:47:22.606348 2020] [ssl:warn] [pid 64] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
phpmyadmin_1  | [Sun Dec 06 16:47:22.629000 2020] [mpm_prefork:notice] [pid 64] AH00163: Apache/2.4.43 (Unix) OpenSSL/1.1.1d PHP/7.3.18 configured -- resuming normal operations
phpmyadmin_1  | [Sun Dec 06 16:47:22.629727 2020] [core:notice] [pid 64] AH00094: Command line: 'httpd -f /opt/bitnami/apache/conf/httpd.conf -D FOREGROUND'

Reverse proxy for Elastic Search

I'm trying to figure out why my VHOST with Proxy context always returns 404, even though I can wget from the OLS container to the elasticsearch container on port 9200.

docRoot                   $VH_ROOT/html/
vhDomain                  elastic.test

errorlog $VH_ROOT/logs/$VH_NAME {
  useServer               1
  logLevel                ERROR
}

accesslog $SERVER_ROOT/logs/$VH_NAME.access.log {
  useServer               0
  rollingSize             100M
}

extprocessor elastic {
  type                    proxy
  address                 http://elasticsearch:9200
  maxConns                500
  pcKeepAliveTimeout      60
  initTimeout             60
  retryTimeout            0
  respBuffer              0
}

context / {
  type                    proxy
  handler                 elastic
  addDefaultCharset       off
}

rewrite  {
  logLevel                0
}

Demosite script not working in a fresh install

Hi there,

I am trying this repo for the first time. I followed the instructions on the README.md but the bin/demosite.sh is not working for me. I see a 503 Service Unavailable after several seconds.

I see this error on the log Aborted connection 3 to db: 'unconnected' user: 'unauthenticated' host: '172.23.0.4' (This connection closed normally without authentication)

The steps I did was:

docker-compose up -d
./bin/demosite.sh

Output for the command:

[O] The root folder ./sites/localhost/ exist.
Database wordpress already exist, skip DB creation!
Storing database parameter
Install unzip package..
Install ed package..
Service finished, enjoy your accelarated LiteSpeed server!

I see the correct configuration on sites/localhost/html/wp-config.php

/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');

/** Database username */
define('DB_USER', 'wordpress');

/** Database password */
define('DB_PASSWORD', 'password');

/** Database hostname */
define('DB_HOST', 'mysql');

And I am using the default values for the .env file:

TimeZone=America/New_York
OLS_VERSION=1.7.15
PHP_VERSION=lsphp80
MYSQL_DATABASE=wordpress
MYSQL_ROOT_PASSWORD=password
MYSQL_USER=wordpress
MYSQL_PASSWORD=password
DOMAIN=localhost

Is there anything I am missing?

Docker version: Docker version 20.10.10, build b485636
Docker compose version: docker-compose version 1.27.4, build 40524192

Kind regards

Can I custom php.ini per vhost?

Hi,

I tried to add php.ini to the vhost (public path), but it's not working. Is it possible to customize the php.ini file for each vhost? Each vhost uses different PHP settings or use only one php.ini for all vhosts?

Thank you,
Nguyen

How can I find vhconf.conf

Hi,

I have made new site and I need to config vhconf.conf but I only see "Example" virtual host

root@7e7beecf8bd7:/usr/local/lsws/conf/vhosts# ls
Example

How can I vhconf.conf for special virtual host for special site?

Thank you so much,
Nguyen

edit php.ini

Dear!
Can i add a custom php.ini file and run it with "docker compose up"?
Thanks!

Stack deploy issue

Hello, the compose file along with other scripts do not work in docker stack. Whenever I issue this command docker stack deploy -c docker-compose.yml mystack, it throws an error. It would be great if you release a stack ready version. Thanks

can't access :8080 after docker-compose up -d

Hi, when I run docker-compose up -d everything look fine, If I add domain and install WP, domain run fine. But just can't acess ip:8080 or other port anymore. Is problem come from change folder name? :\

MariaDB keeps restarting

Hi guys,

I'm trying to use this image to create a local docker environment. I'm on Windows 10 with Ubuntu 20.04 running as a subsystem. I'm using the WSL 2 based engine -- if that matters.

After running docker-compose up -d all seems good, but MariaDB keeps restarting, making it impossible for me to do things like create a database, etc.

afbeelding

Please let me know what you need in order to debug this issue!

Error when run -mod-secure enable

Hi I got this error. is it normal or an error?

bash bin/webadmin.sh --mod-secure enable
Install git
Download OWASP rules
Config OWASP rules.
/usr/local/bin/owaspctl.sh: line 192: cd: /usr/local/lsws/conf/owasp/owasp-modsecurity-crs: No such file or directory        
/usr/local/bin/owaspctl.sh: line 196: cd: /usr/local/lsws/conf/owasp/owasp-modsecurity-crs/rules: No such file or directory  
Enable modsecurity

When I run inside litespeed container I just see those files

root@a27250847e47:/usr/local/lsws/conf/owasp# ls
modsec_includes.conf  modsecurity.conf

Add auto-install missing packages to phpbuild

I have 6 missing packages and 50%+ required some caption changes as *-dev or full another caption (google help me to search required captions, but i lost time while do it).

Total:

apt install gcc libxml2-dev build-essential libexpat1-dev libgeoip-dev libpng-dev libpcre3-dev libssl-dev libxml2-dev rcs zlib1g-dev libmcrypt-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libwebp-dev pkg-config libsqlite3-dev libonig-dev libzip-dev -y

gcc

checking for pkg-config... no
checking for cc... no
checking for gcc... no
apt install gcc -y

libxml

checking for libxml-2.0 >= 2.9.0... no
apt install libxml2-dev -y

openssl

checking for openssl >= 1.0.1... no
No package 'openssl' found
apt install build-essential libexpat1-dev libgeoip-dev libpng-dev libpcre3-dev libssl-dev libxml2-dev rcs zlib1g-dev libmcrypt-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libwebp-dev pkg-config

sqlite3

checking for sqlite3 > 3.7.4... no
configure: error: Package requirements (sqlite3 > 3.7.4) were not met:
No package 'sqlite3' found
apt install libsqlite3-dev

oniguruma

checking for oniguruma... no
configure: error: Package requirements (oniguruma) were not met:
No package 'oniguruma' found
apt install libonig-dev

libzip

checking for libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0... no
configure: error: Package requirements (libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0) were not met:
No package 'libzip' found
apt install libzip-dev

dedicated virtual host

Hi,

I followed this documention to install OLS on docker: https://docs.litespeedtech.com/docker/openlitespeed.

I noticed the virtual hosts are added inside a template under ViHost Templates after executing the bash bin/domain.sh -add domain.com command.

Would it be possible to create a dedicated virtual host directly? (the ones can be found under Virtual Hosts).

Any help is much appreciated!

htaccess not working

hi
i installed a laravel project and added htaccess file to pretty urls. but htaccess not works.
can anybody help?

data/db in gitignore

Currently playing a bit around with ols. I guess I need to add data/db to .gitignore file, since it's being added in my git repo currently, but I was wondering why this haven't been added to the already present gitignore files. Am I missing something specific to OLS?

failed to build RUN apt-get update && apt-get install lsphp74-pgsql

Hi,

I'm want using lsphp74-pgsql for db connection to postgreSQL, when i re-build there are error like below.

[root@myserver ols-docker-env]# docker-compose up --build
Building litespeed
Step 1/2 : FROM litespeedtech/openlitespeed:latest
 ---> 30d522c28646
Step 2/2 : RUN apt-get update && apt-get install lsphp74-pgsql
 ---> Running in c2b59d2cd4d0
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Ign:2 http://rpms.litespeedtech.com/debian bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://rpms.litespeedtech.com/debian bionic Release
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1334 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1413 kB]
Fetched 3000 kB in 19s (159 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libpq5
The following NEW packages will be installed:
  libpq5 lsphp74-pgsql
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 164 kB of archives.
After this operation, 585 kB of additional disk space will be used.
Do you want to continue? [Y/n] Abort.
ERROR: Service 'litespeed' failed to build: The command '/bin/sh -c apt-get update && apt-get install lsphp74-pgsql' returned a non-zero code: 1
[root@myserver ols-docker-env]#

I'm following step by step in this tutorial
https://github.com/litespeedtech/ols-docker-env#customization

It's my costum/Dockerfile

FROM litespeedtech/openlitespeed:latest
RUN apt-get update && apt-get install lsphp74-pgsql

Any help is much appreciated!

Best Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.