OpenLiteSpeed is the open-source edition of LiteSpeed Web Server and delivers significantly higher PHP throughput than Apache or standard Nginx for WordPress and other PHP-heavy applications. Unlike traditional web servers, OpenLiteSpeed uses its own event-driven architecture and a tight integration with the LSPHP interpreter to handle thousands of concurrent connections with minimal RAM. On RHEL 8 you install OpenLiteSpeed from the official LiteSpeed repository, configure it through a browser-based admin panel on port 7080, and add PHP support via the LSPHP 8.0 module. This guide covers every step from repository setup through your first PHP page.
Prerequisites
- RHEL 8 server with a sudo-capable user
- Root or sudo access
- Ports 80, 443, and 7080 reachable from your workstation
firewalldactive- SELinux in enforcing mode
- A registered domain name (optional but recommended for virtual-host setup)
Step 1 — Add the LiteSpeed Repository and Install OpenLiteSpeed
LiteSpeed provides an official RPM repository for RHEL and CentOS. Add it and install the web server package.
sudo rpm -ivh https://rpms.litespeedtech.com/centos/litespeed-repo-1.3-1.el8.noarch.rpm
sudo dnf install -y openlitespeed
ls /usr/local/lsws/
OpenLiteSpeed installs into /usr/local/lsws/. The main configuration directory is /usr/local/lsws/conf/.
Step 2 — Start the OpenLiteSpeed Service and Open Firewall Ports
Enable and start the lsws service, then allow HTTP, HTTPS, and the admin port through firewalld.
sudo systemctl enable lsws
sudo systemctl start lsws
sudo systemctl status lsws
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --permanent --add-port=7080/tcp
sudo firewall-cmd --reload
# Confirm the server is listening
ss -tlnp | grep -E "80|7080|443"
Step 3 — Set the Admin Panel Password and Log In
OpenLiteSpeed ships with a default admin username of admin and a randomly generated password printed during installation. Reset it with the built-in utility before accessing the panel.
sudo /usr/local/lsws/admin/misc/admpass.sh
# Enter new username (leave blank to keep 'admin')
# Enter new password:
# Re-enter new password:
Open a browser and navigate to https://<your-server-ip>:7080. Accept the self-signed certificate warning and log in with the credentials you just set.
Step 4 — Install the LSPHP 8.0 Module
OpenLiteSpeed uses its own PHP implementation called LSPHP. Install LSPHP 8.0 and common extensions from the LiteSpeed repository.
sudo dnf install -y lsphp80 lsphp80-common lsphp80-mysqlnd lsphp80-pdo
lsphp80-gd lsphp80-mbstring lsphp80-xml lsphp80-opcache lsphp80-pecl-redis
# Verify the LSPHP binary
/usr/local/lsws/lsphp80/bin/lsphp -v
# Apply SELinux context so lsws can execute LSPHP
sudo setsebool -P httpd_execmem on
Step 5 — Configure PHP via the Admin Panel and Add a Virtual Host
In the admin panel, navigate to Server Configuration → External App and verify that the lsphp80 entry points to /usr/local/lsws/lsphp80/bin/lsphp. Then create a virtual host:
# Create the document root and a test PHP file
sudo mkdir -p /var/www/example.com/html
sudo tee /var/www/example.com/html/index.php <<'EOF'
EOF
sudo chown -R nobody:nobody /var/www/example.com
sudo semanage fcontext -a -t httpd_sys_content_t "/var/www/example.com(/.*)?"
sudo restorecon -Rv /var/www/example.com
In the admin panel go to Virtual Hosts → Add, set the Virtual Host Root to /var/www/example.com, set the Document Root to $VH_ROOT/html, then click Save. Under Listeners, map the default listener on port 80 to your new virtual host. Click the green Graceful Restart button in the top-right corner to apply changes.
Step 6 — Perform a Graceful Restart and Verify PHP
After any configuration change in the admin panel, a graceful restart reloads settings without dropping active connections.
# Graceful restart from the command line
sudo kill -USR1 $(cat /usr/local/lsws/logs/lshttpd.pid)
# Or use the service wrapper
sudo systemctl reload lsws 2>/dev/null || sudo /usr/local/lsws/bin/lswsctrl restart
# Test PHP rendering
curl -s http://localhost/ | grep -i "php version"
Conclusion
You have installed OpenLiteSpeed on RHEL 8 from the official LiteSpeed repository, secured the admin panel with a custom password, installed LSPHP 8.0 with production-ready extensions, applied the correct SELinux file context to the document root, and configured a virtual host serving a PHP test page. The browser-based admin panel on port 7080 makes ongoing configuration changes — such as adjusting worker thread counts, enabling LSCache for WordPress, or adding SSL listeners — accessible without editing flat configuration files. OpenLiteSpeed’s native LSCache plugin, available separately, integrates directly with WordPress to deliver page caching without a separate Varnish or Nginx caching layer.
Next steps: How to Set Up a LEMP Stack on RHEL 8, How to Configure Nginx FastCGI Caching on RHEL 8, and How to Configure HAProxy for HTTP and TCP Load Balancing on RHEL 8.