PanelDOCSv1.0.0

Web server (Apache or OpenLiteSpeed)

Run every website behind Nginx on Apache or OpenLiteSpeed, switch safely, and reach OpenLiteSpeed's admin console.

Nginx answers every visitor of every website: certificates and AutoSSL, HTTP/2 and HTTP/3, the site firewall, IP rules, maintenance and error pages, the page cache and static files. Behind it, for websites on Nginx + Apache, a second web server runs PHP and reads .htaccess. That web server is Apache (the default) or OpenLiteSpeed, for the whole server.

Where: Server Admin › System › Web server profiles › Web server tab

Apache or OpenLiteSpeed

Apache OpenLiteSpeed
PHP each account's PHP-FPM pool, per PHP version LiteSpeed's lsphp, one per website, running as the account (its own user and group)
.htaccess every rule the rewrite rules (RewriteRule, RewriteCond). Password protection and closed folders are applied by Nginx in front, as for Nginx-only websites.
.htaccess changes read on every request loaded by a graceful restart (see below)
Page cache the Nginx page cache the Nginx page cache, or LiteSpeed Cache for WordPress, per website
PHP settings the panel's PHP settings and the web server profile the same settings, taken from the account's PHP-FPM pool
Web application firewall yes no (the site firewall in Nginx still works)

Websites on Nginx only, Node.js apps and single-page apps don't change when you switch.

Switch the web server

  1. Open the Web server tab.
  2. Click Switch on the web server you want, and confirm. The progress shows in a window while it runs.

Switching to OpenLiteSpeed:

  1. adds LiteSpeed's package repository (its signing key is checked against the published fingerprint first) and installs OpenLiteSpeed and lsphp for every PHP version your websites use;
  2. writes each website's OpenLiteSpeed configuration from the panel's settings and tests it with openlitespeed -t;
  3. starts OpenLiteSpeed on 127.0.0.1:8088, points Nginx at it (tested with nginx -t), and then stops Apache.

Switching back starts Apache first (its configuration is kept up to date the whole time), points Nginx back to it and stops OpenLiteSpeed, which stays installed. If any step fails, the server goes back to the web server it was using and the window shows why. Visitors keep being answered during the switch.

Important: the account's resource limits for PHP processes apply to lsphp as the number of PHP processes per website; lsphp runs in OpenLiteSpeed's own service, not in the account's.

.htaccess on OpenLiteSpeed

OpenLiteSpeed reads .htaccess rewrite rules when it starts. A changed .htaccess is loaded by a graceful restart, which lets requests in progress finish:

  • changed in the panel (Files, the .htaccess editor, Directory privacy, WordPress actions): a few seconds later;
  • changed over SFTP, FTP or SSH: within 5 minutes, when the server checks the websites' .htaccess files.

php_value lines and address lists (Deny from, Require ip) in .htaccess are not applied on OpenLiteSpeed: use the PHP settings and IP rules screens instead. A folder closed with Require all denied is closed by Nginx.

Admin console

OpenLiteSpeed's own admin console listens on 127.0.0.1:8089, on the server only. HF Panel makes a random password for user admin and keeps it sealed. Click Show the admin password to see it, then open the console through an SSH tunnel:

bash
ssh -L 8089:127.0.0.1:8089 root@yourdomain.com

and browse to https://127.0.0.1:8089. Change websites in the panel, not in the console: HF Panel writes OpenLiteSpeed's configuration from its own settings and replaces what was changed there.

Systems

OpenLiteSpeed is offered on every supported system, Intel/AMD and ARM, from LiteSpeed's repository. Which lsphp versions exist depends on the system: when a website uses a PHP version LiteSpeed does not publish for it, the switch stops before anything changes and says which.