Skip to content

Apache to OLS Migration

LiteHTTPD makes Apache-to-OLS migration straightforward by supporting the same .htaccess directives. Most WordPress, Laravel, and Drupal sites work without any .htaccess changes. The default migration path uses LiteHTTPD (Full edition) for maximum compatibility, including RewriteRule execution and php_value support.

  1. Install OLS + LiteHTTPD (Full)

    Terminal window
    dnf install ./openlitespeed-litehttpd-*.rpm

    See Installation for RPM, binary, or source build options.

  2. Convert Apache config (optional)

    Use litehttpd-confconv to convert your Apache virtual host configuration:

    Terminal window
    litehttpd-confconv --input /etc/httpd/conf/httpd.conf \
    --output /usr/local/lsws/conf/apacheconf/ \
    portmap=80:8088,443:8443
  3. Copy your document root

    Point the OLS vhost to the same document root:

    docRoot /var/www/html
  4. Enable .htaccess processing

    Add to your vhost config:

    allowOverride 255
    autoLoadHtaccess 1
  5. Configure PHP

    Link lsphp to OLS:

    Terminal window
    ln -sf /usr/local/lsws/lsphp84/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp
  6. Test and verify

    Terminal window
    /usr/local/lsws/bin/lswsctrl restart
    curl -I http://localhost:8088/
  • All .htaccess files in your document root tree
  • WordPress permalink rewrite rules
  • Security plugin rules (AIOS, Wordfence, etc.)
  • Cache headers (W3TC, WP Super Cache)
  • Custom redirects and error documents

| Apache Feature | OLS Equivalent | |---------------|----------------| | LoadModule in httpd.conf | OLS module config in httpd_config.conf | | VirtualHost blocks | OLS vhost directories | | mod_php / php-fpm | lsphp via LSAPI | | SSL certificates | OLS listener SSL config | | ProxyPass | OLS external app + context |