Zum Hauptinhalt springen

โšก LiteSpeed / OpenLiteSpeed

LiteSpeed is an excellent choice for Monitron SaaS โ€” it's fast, efficient, and can read Apache .htaccess files natively, so setup is straightforward.


๐Ÿ“‹ Voraussetzungenโ€‹

  • LiteSpeed Web Server or OpenLiteSpeed
  • PHP 8.2+ (LSAPI)

๐Ÿ”ง Configurationโ€‹

Option A: Using .htaccess (Easiest)โ€‹

LiteSpeed reads Apache .htaccess files automatically! Monitron already includes a .htaccess file in public/, so:

  1. Set the Document Root to /var/www/monitron/public
  2. Enable rewrite in your virtual host settings
  3. That's it! ๐ŸŽ‰

Option B: LiteSpeed Virtual Host Configโ€‹

In your LiteSpeed admin panel (https://your-server:7080):

  1. Navigate to Virtual Hosts โ†’ Add
  2. Fill in:
EinstellungWert
Virtual Host Namemonitron
Virtual Host Root/var/www/monitron/
Document Root$VH_ROOT/public/
Domain Nameyour-domain.com
  1. Under Rewrite tab:
    • Enable Rewrite: Yes
    • Rewrite Rules:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
  1. Under Security tab:
    • Block access to .env file:
    <FilesMatch "^\.env">
    Require all denied
    </FilesMatch>

๐Ÿ”’ SSL Setupโ€‹

In the LiteSpeed admin panel:

  1. Navigate to Listeners โ†’ Add SSL Listener (or edit existing)
  2. Set port to 443
  3. Under SSL tab:
    • Private Key File: /etc/letsencrypt/live/your-domain.com/privkey.pem
    • Certificate File: /etc/letsencrypt/live/your-domain.com/fullchain.pem

๐Ÿ˜ PHP Configurationโ€‹

LiteSpeed uses LSAPI for PHP which is very fast. In the admin panel:

  1. Navigate to Server Configuration โ†’ External App
  2. Make sure your PHP 8.3 LSAPI app is configured
  3. Set Max Connections: 20
  4. Set Initial Request Timeout: 120 (for AI features)

โœ… Uberprufenโ€‹

After configuration, restart LiteSpeed:

# LiteSpeed Enterprise
sudo systemctl restart lsws

# OpenLiteSpeed
sudo systemctl restart lshttpd

Visit https://your-domain.com to verify.


๐Ÿ’ก Leistungstippsโ€‹

LiteSpeed has several advantages for Monitron:

  • Built-in caching: Enable LSCache for static assets
  • HTTP/3 support: Enable QUIC for faster page loads
  • Efficient PHP handling: LSAPI is faster than PHP-FPM
  • Low memory usage: Great for VPS with limited RAM