S
S
semki0962020-02-25 13:51:07
Nginx
semki096, 2020-02-25 13:51:07

How to setup nginx config for Websockets?

After transferring the site from the open server to ubuntu 18 + Nginx - Websocket server began to issue such messages

ReferenceError: message is not defined at WebSocket.incoming ...

I suspect that the matter is in the Nginx configuration, please tell me how to configure it.
Here is my nginx config (site on laravel)
server {
        listen 80 default_server;
        server_name domen.ru;
        root /usr/share/nginx/html/public;
        index index.php index.html;

        # set max upload size
        client_max_body_size 2G;
        fastcgi_buffers 64 4K;

        access_log /var/log/nginx/http_access.log combined;
        error_log /var/log/nginx/http_error.log;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question