⚡ 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.
📋 前提条件
- 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:
- Set the Document Root to
/var/www/monitron/public - Enable rewrite in your virtual host settings
- That's it! 🎉
Option B: LiteSpeed Virtual Host Config
In your LiteSpeed admin panel (https://your-server:7080):
- Navigate to Virtual Hosts → Add
- Fill in:
| 設定 | 値 |
|---|---|
| Virtual Host Name | monitron |
| Virtual Host Root | /var/www/monitron/ |
| Document Root | $VH_ROOT/public/ |
| Domain Name | your-domain.com |
- Under Rewrite tab:
- Enable Rewrite: Yes
- Rewrite Rules:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
- Under Security tab:
- Block access to
.envfile:
<FilesMatch "^\.env">
Require all denied
</FilesMatch> - Block access to
🔒 SSL Setup
In the LiteSpeed admin panel:
- Navigate to Listeners → Add SSL Listener (or edit existing)
- Set port to 443
- Under SSL tab:
- Private Key File:
/etc/letsencrypt/live/your-domain.com/privkey.pem - Certificate File:
/etc/letsencrypt/live/your-domain.com/fullchain.pem
- Private Key File:
🐘 PHP Configuration
LiteSpeed uses LSAPI for PHP which is very fast. In the admin panel:
- Navigate to Server Configuration → External App
- Make sure your PHP 8.3 LSAPI app is configured
- Set Max Connections:
20 - Set Initial Request Timeout:
120(for AI features)
✅ 確認
After configuration, restart LiteSpeed:
# LiteSpeed Enterprise
sudo systemctl restart lsws
# OpenLiteSpeed
sudo systemctl restart lshttpd
Visit https://your-domain.com to verify.
💡 パフォーマンスのヒント
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