Commit 901cddf3 authored by Elizaveta Kakhovskaya's avatar Elizaveta Kakhovskaya

Update index.rst

parent efea07f8
......@@ -59,35 +59,38 @@
В ``nginx.conf`` в ``http`` прописать:
.. code-block:: html
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream websocket {
server 127.0.0.1:8080;
}
upstream websocket {
server 127.0.0.1:8080;
}
В ``synergy.base``:
.. code-block:: html
location /constructor/websocket {
proxy_pass http://websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /constructor/websocket {
proxy_pass http://websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
В случае добавления ``ws`` для нескольких серверов на ``DNS``-сервере запись ``upstream`` в ``nginx.conf`` может выглядеть так:
.. code-block:: html
upstream websocket {
server 192.168.3.1:8080;
server 192.168.3.2:8080;
}
upstream websocket {
server 192.168.3.1:8080;
server 192.168.3.2:8080;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment