# Cyberpanel/LiteSpeed

This guide explains how to configure **OpenLiteSpeed / CyberPanel** to proxy `/app` requests to a local WebSocket server on port `6001` for the domain `example.com`.

***

#### 1. Prerequisites

* CyberPanel / OpenLiteSpeed installed
* Domain `example.com` already created in CyberPanel
* WebSocket server running locally on `127.0.0.1:6001`

***

#### 2. Enable WebSocket Support

1. Login to **CyberPanel**
2. Go to: **Websites → List Websites → Manage → example.com**
3. Find **Web Socket Proxy / Enable WebSocket**
4. Set to **Yes / Enabled**
5. Set **Timeout** (recommended: `3600` seconds)
6. Save

> This allows the virtual host to handle WebSocket connections.

***

#### 3. Add WebSocket Proxy Definition

1. In the **Web Socket Proxy** section, click **Add New Definition**
2. Fill in:

| Field         | Value                      |
| ------------- | -------------------------- |
| **URI**\*     | `/app`                     |
| **Address**\* | `127.0.0.1:6001`           |
| **Notes**     | `WebSocket proxy for /app` |

3. Save and apply changes
4. Restart OpenLiteSpeed to activate the proxy

> This forwards all requests to `/app` on `example.com` to the WebSocket server at `127.0.0.1:6001`.

<figure><img src="https://2231621966-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVNlKuUeCM_uD7sLQnM%2Fuploads%2FusAkwOEHzaFLSadvIYKx%2Fimage.png?alt=media&#x26;token=d1f382e6-d004-4e22-967e-531d745d54d1" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2231621966-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVNlKuUeCM_uD7sLQnM%2Fuploads%2F845AUYSKlq1Lw1mTrJOg%2Fimage.png?alt=media&#x26;token=12dc83a6-459e-4578-9b8f-5569f5ca416a" alt=""><figcaption></figcaption></figure>
