fix(nginx): proxy realtime and terminal WebSockets on the dashboard port

A reverse proxy that forwards only port 8000 (for example Tailscale Serve or a Cloudflare Tunnel without path rules) sent /app/ and /terminal/ws to Laravel. Proxy them to Reverb (6001) and the terminal server (6002) in the container.

Closes #11707
This commit is contained in:
Andras Bacsai
2026-10-23 23:06:51 +02:00
parent 1bebdffaff
commit f97398c83c
2 changed files with 36 additions and 0 deletions
@@ -29,6 +29,24 @@ location /healthcheck {
fastcgi_pass 127.0.0.1:9000;
}
# Proxy the realtime (Reverb) and terminal WebSockets that run in this container, so a
# reverse proxy that forwards only this port (for example Tailscale Serve) also serves them.
location /app/ {
proxy_pass http://127.0.0.1:6001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
location = /terminal/ws {
proxy_pass http://127.0.0.1:6002;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
# Have NGINX try searching for PHP files as well
location / {
try_files $uri $uri/ /index.php?$query_string;
@@ -29,6 +29,24 @@ location /healthcheck {
fastcgi_pass 127.0.0.1:9000;
}
# Proxy the realtime (Reverb) and terminal WebSockets that run in this container, so a
# reverse proxy that forwards only this port (for example Tailscale Serve) also serves them.
location /app/ {
proxy_pass http://127.0.0.1:6001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
location = /terminal/ws {
proxy_pass http://127.0.0.1:6002;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
# Have NGINX try searching for PHP files as well
location / {
try_files $uri $uri/ /index.php?$query_string;