Skip to content

Quick Start

  1. Install LiteHTTPD (RPM repo):

    Terminal window
    curl -s https://rpms.litehttpd.com/setup.sh | bash
    dnf install openlitespeed-litehttpd
    systemctl restart lsws
  2. Configure your vhost in vhconf.conf:

    docRoot /var/www/html
    allowOverride 255
    autoLoadHtaccess 1
  3. Create or verify your WordPress .htaccess:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress
  4. Restart OLS:

    Terminal window
    /usr/local/lsws/bin/lswsctrl restart
  5. Verify Full features:

    Terminal window
    # RewriteRule [R=301] works
    curl -I localhost:8088/test-redirect/old-page
    # Returns 301 Moved Permanently
    # Header set works
    curl -I localhost:8088/
    # Shows custom headers
    # Require all denied works
    curl -I localhost:8088/.htaccess
    # Returns 403 Forbidden
  1. Copy the module to OLS:

    Terminal window
    cp litehttpd_htaccess.so /usr/local/lsws/modules/
  2. Enable the module:

    Terminal window
    cat >> /usr/local/lsws/conf/httpd_config.conf <<'CONF'
    module litehttpd_htaccess {
    ls_enabled 1
    }
    CONF
  3. Restart and verify:

    Terminal window
    /usr/local/lsws/bin/lswsctrl restart
    # Header set works
    curl -I localhost:8088/
    # Shows custom headers
    # Require all denied works
    curl -I localhost:8088/.htaccess
    # Returns 403 Forbidden

RewriteRule [R=301] will return 404 in Thin edition. Use Full for redirect support.