Installation
LiteHTTPD Installation
Section titled “LiteHTTPD Installation”LiteHTTPD (Full) is the default and recommended edition. It includes the patched OLS binary and the htaccess module.
Prerequisites
Section titled “Prerequisites”- OpenLiteSpeed 1.7.0 or later
- Linux x86_64 (ARM64 not yet supported)
-
Add the LiteHTTPD RPM repository and install:
Terminal window curl -s https://rpms.litehttpd.com/setup.sh | bashdnf install openlitespeed-litehttpdThis single RPM includes the patched OLS binary, the bundled htaccess module, and auto-configuration. Packages are GPG signed.
-
Restart OLS:
Terminal window systemctl restart lsws
-
Download from rpms.litehttpd.com or add the repository:
-
Install:
Terminal window dnf install ./openlitespeed-litehttpd-*.rpm -
Restart OLS:
Terminal window systemctl restart lsws
Distro-independent tarballs (glibc 2.28+, built like the official OLS tarball — extract and run install.sh). Download from rpms.litehttpd.com or the GitHub release.
-
Fresh install (no OpenLiteSpeed yet) — installs the complete patched OLS + module:
Terminal window curl -LO https://rpms.litehttpd.com/openlitespeed-litehttpd-1.8.5-x86_64-linux.tgztar xzf openlitespeed-litehttpd-1.8.5-x86_64-linux.tgzcd openlitespeed-litehttpd-1.8.5 && sudo ./install.sh -
Already running official OpenLiteSpeed — pick an overlay:
- Full features (overlay the patched binary — must match your installed OLS version; backs up the original):
Terminal window tar xzf litehttpd-ols-patch-1.8.5-x86_64-linux.tgzcd litehttpd-ols-patch-1.8.5 && sudo ./install.sh - Module only (works on any OLS version; no binary change —
RewriteRule/php_valueare parsed but not executed):Terminal window tar xzf litehttpd-module-0.2.2-x86_64-linux.tgzcd litehttpd-module-0.2.2 && sudo ./install.sh
- Full features (overlay the patched binary — must match your installed OLS version; backs up the original):
-
Restart OLS:
Terminal window /usr/local/lsws/bin/lswsctrl restart
-
Install build dependencies:
Terminal window # AlmaLinux / Rocky / RHELdnf install cmake gcc gcc-c++ libcrypt-devel# Ubuntu / Debianapt install cmake g++ libcrypt-dev -
Clone OLS, apply patches, and build:
Terminal window git clone --branch v1.8.5 https://github.com/litespeedtech/openlitespeed.gitcd openlitespeedpatch -p1 < /path/to/patches/0001-lsiapi-phpconfig.patchpatch -p1 < /path/to/patches/0002-lsiapi-rewrite.patch# Apply patches 0003, 0004bash build.sh -
Build the module:
Terminal window cd /path/to/litehttpdcmake -B build -DCMAKE_BUILD_TYPE=Releasecmake --build build --target litehttpd_htaccess -
Install:
Terminal window cp build/litehttpd_htaccess.so /usr/local/lsws/modules/
LiteHTTPD-Thin (Module Only)
Section titled “LiteHTTPD-Thin (Module Only)”For stock OLS without patches. Quick to set up but limited:
- RewriteRule directives are parsed but not executed
php_value/php_flagdirectives are parsed but not passed to lsphp
-
Copy the module to OLS:
Terminal window cp litehttpd_htaccess.so /usr/local/lsws/modules/ -
Enable the module in OLS config:
Terminal window cat >> /usr/local/lsws/conf/httpd_config.conf <<'CONF'module litehttpd_htaccess {ls_enabled 1}CONF -
Restart OLS:
Terminal window /usr/local/lsws/bin/lswsctrl restart
Consider upgrading to Full for production WordPress sites that rely on .htaccess redirects.