//$context = array(
// 'ssl' => array(
// 'local_cert' => __DIR__ . '/fullchain.pem',
// 'local_pk' => __DIR__ . '/privkey.pem',
// 'verify_peer' => false,
// )
//);
// Create a Websocket server
$ws_worker = new Worker('websocket://0.0.0.0:8282');
//$ws_worker->transport = 'ssl';
// И так далее...без ssl настроек
server {
charset utf-8;
client_max_body_size 128M; ## listen for ipv4
listen 443 ssl; # managed by Certbot
listen [::]:443 ssl;
ssl_certificate /etc/letsencrypt/live/www.dist.devarea.space/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.dist.devarea.space/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
server_name www.dist.devarea.space dist.devarea.space;
root /var/www/html/dist/web;
index index.php;
location ~ ^/wss {
# Websocket port 8282
proxy_pass http://localhost:8282; # также пробовал http://127.0.0.1:8282;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
location / {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ ^/assets/.*\.php$ {
deny all;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
try_files $uri =404;
}
location ~* /\. {
deny all;
}
}
Заменил в конфиге nginx location ~ ^/wss на location ~ ^/wss/ , убрал SSL кофиг из WORKMAN, переустановил сертификат, перегрузил сервер, выпил кофе... и все заработало!
Спасибо за помощь.