Raised: $0
0% of monthly goal Help us cross the finish line!
Goal: $12,000
Raised: $0 Goal: $12,000
0% of monthly goal Help us cross the finish line!
Sponsor DDEV

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.

add-on registry tests last commit release

ddev-openlitespeed

Replaces DDEV’s default web server (nginx/apache-fpm) with OpenLiteSpeed running lsphp (the LiteSpeed SAPI PHP), so you can develop and test against a real OpenLiteSpeed stack locally.

Built on DDEV’s webserver_type: generic mechanism (the add-on needs DDEV v1.24.10+), the same one the official ddev-frankenphp add-on uses.

What you get

Install

ddev add-on get morvy/ddev-openlitespeed
ddev restart

PHP versions

Every PHP version DDEV supports (5.6–8.5). Set one with ddev config --php-version=<version> && ddev restart.

lsphp is php<version>-litespeed from the same repository as DDEV’s php<version>-fpm, installed in the web container. Installing it may move the image’s php<version>-* packages to that repository’s current patch release (all together).

PHP 8.6 needs a DDEV release newer than v1.25.4 (DDEV refuses to start it before that); the add-on needs no change for it.

How it works

Inside the web container, two supervised daemons run as the project’s (non-root, code-owning) user:

Piece Role
config.openlitespeed.yaml sets webserver_type: generic; runs the lsphp and openlitespeed daemons; exposes 80/443 through ddev-router
web-build/Dockerfile.openlitespeed installs OpenLiteSpeed and php${DDEV_PHP_VERSION}-litespeed; links the SAPI’s php.ini and conf.d to DDEV’s fpm ones
web-build/openlitespeed/ddev-openlitespeed-lsphp lsphp daemon on 127.0.0.1:9000; restart-safe (DDEV runs daemons under bash -c, so it clears a leftover lsphp before binding)
web-build/openlitespeed/httpd_config.conf main OLS config: one vhost, lsphp external app (autoStart 0), LSCache module, :80 (router) + :443 (DDEV master cert) listeners
web-build/openlitespeed/vhost.conf vhost template; docroot injected at start; rewrites X-Forwarded-Proto into real HTTPS server vars; serves DDEV’s 404/403 pages
web-build/openlitespeed/ddev-openlitespeed-start foreground OLS wrapper: renders the vhost, pins the run user, streams logs; restart-safe (clears a leftover OLS and wrapper first)

Request flow: ddev-router terminates public TLS and forwards plain HTTP to OLS on :80 (with X-Forwarded-Proto); OLS restores the HTTPS server vars and proxies PHP over LSAPI to lsphp on 127.0.0.1:9000.

Why lsphp is a separate process: this OLS build has no working suEXEC/cgid helper, so OLS cannot fork lsphp itself (cgidSuEXEC failed). lsphp runs as its own daemon and the external app uses autoStart 0 (connect-only).

Known limitations

Uninstall

ddev add-on remove openlitespeed
ddev restart

Removes the #ddev-generated files and reverts webserver_type to your project’s previous value. Upgrading from v1.0.x removes its lsphp sidecar files.

Releasing

Push a version tag; the release workflow runs the full PHP matrix against it and publishes a GitHub release only if every job passes:

git tag v1.1.0
git push origin v1.1.0

License

Apache-2.0 — see LICENSE.

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.