180 lines
3.6 KiB
Markdown
180 lines
3.6 KiB
Markdown
[KUBE](../../README.md) / [k3s](../k3s.md) / OpenLiteSpeed
|
|
|
|
# Resource OpenLiteSpeed
|
|
|
|
> [!NOTE]
|
|
> Two (you can specify a different number) pods are created. They work simultaneously. If one pod fails, the second pod starts processing all requests until a replacement for the failed pod is brought up. When changes are made to the virtual host configuration, OpenLiteSpeed is restarted sequentially in all pods.
|
|
>
|
|
> The administration panel OpenLiteSpeed is available at an address:
|
|
> - `<domain>:31080` (local and remote)
|
|
> - `<server ip>:31080` (remote)
|
|
> - `<node ip>:7080` (local, `<node ip>` can be found upon request: `kube.sh --info | grep 7080`)
|
|
|
|
- [Install](#install)
|
|
- [Remove](#remove)
|
|
- [Status](#status)
|
|
- [Info](#info)
|
|
- [Version](#version)
|
|
- [Restart](#restart)
|
|
- [Site list](#site-list)
|
|
- [Site unlock](#site-unlock)
|
|
- [Site lock](#site-lock)
|
|
- [Config](#config-test)
|
|
***
|
|
|
|
## Install
|
|
|
|
### Processing
|
|
1. Creation.
|
|
- Prepare the import file.
|
|
- Import the YAML.
|
|
|
|
2. Post-processing.
|
|
- Initialization.
|
|
|
|
Command:
|
|
```bash
|
|
sudo kube.sh --ols install
|
|
```
|
|
|
|
Example of log:
|
|
```bash
|
|
🔹[OpenLiteSpeed] Install
|
|
🔹[OpenLiteSpeed] Preparing /app/kube/assets/yaml/openlitespeed.yaml
|
|
🔹[K3S] Applying YAML /app/kube/data/yaml/openlitespeed.yaml
|
|
💡[K3S] Waiting for pods to be ready... | 1 not ready
|
|
💡[K3S] Waiting for pods to be ready... | 1 not ready
|
|
✅[OpenLiteSpeed] Applied /app/kube/data/yaml/openlitespeed.yaml
|
|
🔹[OpenLiteSpeed] Initialization...
|
|
🔹[OpenLiteSpeed] Authorization parameters updated
|
|
service/traefik patched
|
|
🔹[OpenLiteSpeed] Pod: openlitespeed-0 | Restart...
|
|
🔹[OpenLiteSpeed] Pod: openlitespeed-1 | Restart...
|
|
✅[OpenLiteSpeed] Initialization completed successfully
|
|
```
|
|
***
|
|
|
|
## Remove
|
|
|
|
Command:
|
|
```bash
|
|
sudo kube.sh --ols remove
|
|
```
|
|
***
|
|
|
|
## Status
|
|
|
|
Command:
|
|
```bash
|
|
sudo kube.sh --ols status
|
|
```
|
|
|
|
Example of log:
|
|
```bash
|
|
🔹[OpenLiteSpeed] Status
|
|
✅[OpenLiteSpeed] openlitespeed-0 | Running | PID 251
|
|
✅[OpenLiteSpeed] openlitespeed-1 | Running | PID 216
|
|
```
|
|
***
|
|
|
|
## Info
|
|
|
|
Command:
|
|
```bash
|
|
sudo kube.sh --ols info
|
|
```
|
|
|
|
Example of log:
|
|
```bash
|
|
🔹[OpenLiteSpeed] Info
|
|
🔹[OpenLiteSpeed] openlitespeed-0
|
|
litespeed is running with PID 251.
|
|
🔹[OpenLiteSpeed] openlitespeed-1
|
|
litespeed is running with PID 216.
|
|
```
|
|
***
|
|
|
|
## Version
|
|
|
|
Command:
|
|
```bash
|
|
sudo kube.sh --ols version
|
|
```
|
|
|
|
Example of log:
|
|
```bash
|
|
🔹[OpenLiteSpeed] Version
|
|
✅[OpenLiteSpeed] openlitespeed-0 | LiteSpeed/1.8.3 Open (BUILD built: Fri Feb 28 16:33:02 UTC 2025)
|
|
✅[OpenLiteSpeed] openlitespeed-0 | PHP: 8.3.17
|
|
✅[OpenLiteSpeed] openlitespeed-1 | LiteSpeed/1.8.3 Open (BUILD built: Fri Feb 28 16:33:02 UTC 2025)
|
|
✅[OpenLiteSpeed] openlitespeed-1 | PHP: 8.3.17
|
|
```
|
|
***
|
|
|
|
## Restart
|
|
|
|
Command:
|
|
```bash
|
|
sudo kube.sh --ols restart
|
|
```
|
|
|
|
Example of log:
|
|
```bash
|
|
🔹[OpenLiteSpeed] Restart
|
|
🔹[OpenLiteSpeed] Pod: openlitespeed-0 | Restart...
|
|
🔹[OpenLiteSpeed] Pod: openlitespeed-1 | Restart...
|
|
```
|
|
***
|
|
|
|
## Site list
|
|
|
|
Command:
|
|
```bash
|
|
sudo kube.sh --ols list [option]
|
|
```
|
|
|
|
Options:
|
|
- all - All sites (colored up/down) (default)
|
|
- all - All sites
|
|
- up - Unlocked sites
|
|
- down - Locked sites
|
|
|
|
Example of log:
|
|
```bash
|
|
example1.com
|
|
example2.com
|
|
example3.com
|
|
```
|
|
***
|
|
|
|
## Site unlock
|
|
|
|
> [!NOTE]
|
|
> Unlock domain (Resume site operation in OpenLiteSpeed).
|
|
|
|
Command:
|
|
```bash
|
|
sudo kube.sh --ols up <domain>
|
|
```
|
|
***
|
|
|
|
## Site lock
|
|
|
|
> [!NOTE]
|
|
> Lock domain (Pause the site in OpenLiteSpeed).
|
|
>
|
|
> The OpenLiteSpeed page will be displayed with a 403 error when the domain is accessed.
|
|
|
|
Command:
|
|
```bash
|
|
sudo kube.sh --ols down <domain>
|
|
```
|
|
***
|
|
|
|
## Config test
|
|
|
|
Command:
|
|
```bash
|
|
sudo kube.sh --ols config
|
|
```
|