Your SSL certificate and key settings point to the same file, which is wrong. Also the values aren't quoted correctly. I'd start by fixing those.
$http and $http_host are built-in variables in Nginx. Check the documentation for more information.
I have tried everything now, but I despair. But it won't run locally on the server.
I have a Linux server with plesk.
I'm having trouble knowing what to do with the ssl. I am using LetsEncrypt. Can I use that or do I have to use something else? How do I integrate it?
The whole thing is only used internally and not externally.
This is what my nginx looks like, which irritates me, in the tutorials it always says host $http_host, but in the file there is no such thing, it says host $host. Is the $http_host correct now or do I have to change it to $host?
server {
listen server_ip_v4:443 ssl;
listen [server_ip_v6]:443 ssl;
ssl_certificate "/opt/psa/var/certificates/dfghuzkuiksdf"
ssl_certificate_key "/opt/psa/var/certificates/dfghuzkuiksdf"
client_max_body_size 2048m;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_max_temp_file_size 0;
proxy_buffers 16 16k;
proxy_buffer_size 32k;
proxy_busy_buffers_size 32k;
server_name _;
location / {
proxy_pass http://127.0.0.1:8880;
proxy_redirect http://$host:8880 $scheme://$host;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Http-Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
access_log off;
gzip on;
gzip_types text/plain text/css application/json application/x-j>
}
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_pass http://0.0.0.0:8080;
}
location ~ /(ws|websocket)(/|$) {
proxy_pass http://127.0.0.1:8880;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Http-Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
access_log off;
}
underscores_in_headers on;
}
Then here is my env
QUEUE_CONNECTION=sync
BROADCAST_CONNECTION=reverb
REVERB_APP_ID=?_id
REVERB_APP_KEY=?_key
REVERB_APP_SECRET=?_secret
REVERB_HOST="meinwarden.de"
REVERB_PORT=443
REVERB_SCHEME=https
VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"
and I call that:
php artisan reverb:start --debug
INFO Starting server on 0.0.0.0:8080 (meinwarden.de).
Error message is then just:
wss://meinwarden.de/app/{id}?protocol=7&client=js&version=8.4.0-rc2&flash=false' failed:
reverb conf:
'reverb' => [
'host' => env('REVERB_SERVER_HOST', '0.0.0.0'),
'port' => env('REVERB_SERVER_PORT', 8080),
'hostname' => env('REVERB_HOST'),
'options' => [
'tls' => [],
],
'max_request_size' => env('REVERB_MAX_REQUEST_SIZE', 10_000),
'scaling' => [
'enabled' => env('REVERB_SCALING_ENABLED', false),
'channel' => env('REVERB_SCALING_CHANNEL', 'reverb'),
'server' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'port' => env('REDIS_PORT', '6379'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'database' => env('REDIS_DB', '0'),
],
],
'pulse_ingest_interval' => env('REVERB_PULSE_INGEST_INTERVAL', 15),
'telescope_ingest_interval' => env('REVERB_TELESCOPE_INGEST_INTERVAL', 15),
],
broadcasting config
'reverb' => [
'driver' => 'reverb',
'key' => env('REVERB_APP_KEY'),
'secret' => env('REVERB_APP_SECRET'),
'app_id' => env('REVERB_APP_ID'),
'options' => [
'host' => env('REVERB_HOST'),
'port' => env('REVERB_PORT', 443),
'scheme' => env('REVERB_SCHEME', 'https'),
'useTLS' => env('REVERB_SCHEME', 'https') === 'https',
],
'client_options' => [
// 'verify' => env('BROADCAST_VERIFY', true),
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
],
],
I have released ports
cat /proc/sys/net/ipv4/ip_local_port_range
# 32768 60999
echo.js
import Echo from 'laravel-echo';
import Pusher from 'pusher-js';
window.Pusher = Pusher;
window.Echo = new Echo({
broadcaster: 'reverb',
key: import.meta.env.VITE_REVERB_APP_KEY,
wsHost: import.meta.env.VITE_REVERB_HOST,
wsPort: import.meta.env.VITE_REVERB_PORT ?? 80,
wssPort: import.meta.env.VITE_REVERB_PORT ?? 443,
forceTLS: (import.meta.env.VITE_REVERB_SCHEME ?? 'https') === 'https',
enabledTransports: ['ws', 'wss'],
});
I hope I have specified everything that is important. BR Tibor
Server reinstalled and everything implemented with Apache, then it worked.
Please or to participate in this conversation.