Apache to OLS Migration
Migration Overview
Section titled “Migration Overview”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.
Step-by-Step Migration
Section titled “Step-by-Step Migration”-
Install OLS + LiteHTTPD (Full)
Terminal window dnf install ./openlitespeed-litehttpd-*.rpmSee Installation for RPM, binary, or source build options.
-
Convert Apache config (optional)
Use
litehttpd-confconvto 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 -
Copy your document root
Point the OLS vhost to the same document root:
docRoot /var/www/html -
Enable .htaccess processing
Add to your vhost config:
allowOverride 255autoLoadHtaccess 1 -
Configure PHP
Link lsphp to OLS:
Terminal window ln -sf /usr/local/lsws/lsphp84/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp -
Test and verify
Terminal window /usr/local/lsws/bin/lswsctrl restartcurl -I http://localhost:8088/
What Transfers Automatically
Section titled “What Transfers Automatically”- All
.htaccessfiles 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
What Needs Manual Configuration
Section titled “What Needs Manual Configuration”| 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 |