34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
# Laravel Reverb + broadcasting auth for mm.com.tm
|
|
#
|
|
# Paste into the existing HTTPS server { } for mm.com.tm.
|
|
#
|
|
# 1) Laravel PHP prefixes MUST include `broadcasting`, otherwise
|
|
# POST /broadcasting/auth is caught by `location /` and proxied to
|
|
# the SPA on :4173 (404). Keep this in the same regex as api/panel:
|
|
#
|
|
# location ~ ^/(api|storage|panel|vendor|nova-api|nova-vendor|sanctum|nova|app-docs|broadcasting) {
|
|
# try_files $uri $uri/ /index.php?$query_string;
|
|
# }
|
|
#
|
|
# 2) Reverb (supervisor) stays on 127.0.0.1:8080.
|
|
# Browsers connect to wss://mm.com.tm/app/...
|
|
# Place `location /app` BEFORE the SPA `location /` catch-all.
|
|
|
|
location /app {
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header Scheme $scheme;
|
|
proxy_set_header SERVER_PORT $server_port;
|
|
proxy_set_header REMOTE_ADDR $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
|
|
proxy_connect_timeout 60s;
|
|
proxy_send_timeout 60s;
|
|
proxy_read_timeout 86400s;
|
|
proxy_buffering off;
|
|
|
|
proxy_pass http://127.0.0.1:8080;
|
|
}
|