Skip to content

Commit d7698ef

Browse files
committed
[5.x] Document HORIZON_PROXY_PATH environment variable
This PR documents the new `HORIZON_PROXY_PATH` environment variable, introduced in [laravel/horizon#1538](laravel/horizon#1538). It allows configuring a proxy prefix when Horizon is served from a subdirectory.
1 parent da03fe3 commit d7698ef

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

horizon.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,19 @@ When you start Horizon, it will use the worker process configuration options for
101101
> [!WARNING]
102102
> You should ensure that the `environments` portion of your `horizon` configuration file contains an entry for each [environment](/docs/{{version}}/configuration#environment-configuration) on which you plan to run Horizon.
103103
104+
#### Proxy Path (Running Horizon under a Subdirectory)
105+
106+
If you need to serve Horizon from a subdirectory (e.g., `domain.laravel/myapp/horizon`), you can configure the `proxy_path` option in your `config/horizon.php` file:
107+
108+
```php
109+
'proxy_path' => env('HORIZON_PROXY_PATH', '/myapp'),
110+
```
111+
112+
Additionally, define the environment variable in your .env file:
113+
114+
```dotenv
115+
HORIZON_PROXY_PATH=/myapp
116+
```
104117
<a name="supervisors"></a>
105118
#### Supervisors
106119

0 commit comments

Comments
 (0)