Skip to content

Configuration

Add to /usr/local/lsws/conf/httpd_config.conf:

module litehttpd_htaccess {
ls_enabled 1
}

Add to your vhost config (/usr/local/lsws/conf/vhosts/<name>/vhconf.conf):

allowOverride 255
autoLoadHtaccess 1
ValueCategoryDirectives
1LimitOrder, Allow, Deny
2AuthAuthType, AuthName, Require, Satisfy
4FileInfoAddType, Redirect, Rewrite, ErrorDocument
8IndexesOptions Indexes
16OptionsOptions (non-Indexes), Expires, Limit
255AllAll directives (recommended)

RewriteRule execution is enabled automatically when a patched OLS binary is detected. No additional configuration is needed.

With the patched OLS binary, php_value and php_flag directives in .htaccess are passed to lsphp via the LSIAPI PHPConfig API.

Apache config auto-conversion (Patch 0003)

Section titled “Apache config auto-conversion (Patch 0003)”

The readApacheConf directive converts an existing Apache httpd.conf to OLS native config at startup:

readApacheConf /etc/httpd/conf/httpd.conf portmap=80:8088

For production deployments, configure lsphp worker pool:

extProcessor lsphp {
env PHP_LSAPI_CHILDREN=10
env PHP_LSAPI_MAX_IDLE=300
}

This pre-starts 10 PHP workers, eliminating cold-start latency.

When running LiteHTTPD-Thin (module only, stock OLS binary):

  • RewriteRule directives are parsed but not executed — requests fall through to OLS native routing
  • php_value and php_flag are parsed but not passed to lsphp
  • Options -Indexes is stored as a hint but not enforced at engine level
  • readApacheConf is not available