Сайт залит на домен syn-q.ru на рег.ру
Создана днс запись А под внешний ip сервера (физический комп стоит рядом)
В днс серверах и управлениях зоной стоит
ns5.hosting.reg.ru
ns6.hosting.reg.ru
ssl сертификат и ключ беру от рег.ру (они исправны)
на сервере запущен websocket сервер на localhost:8831 (так же настроен под ssl):
if __name__ == "__main__":
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
ssl_context.load_cert_chain(certfile = "./nginx.crt", keyfile = "./nginx.key")
st_ser = websockets.serve(response, "localhost", 8831, ssl = ssl_context)
asyncio.get_event_loop().run_until_complete(st_ser)
asyncio.get_event_loop().run_forever()
nginx.conf:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
error_log /var/log/nginx/error.log;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
server {
listen 443 ssl;
server_name syn-q.ru www.syn-q.ru;
keepalive_timeout 70;
ssl_certificate /etc/nginx/syn-q.ru.crt;
ssl_certificate_key /etc/nginx/syn-q.ru.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
location /socket/ {
proxy_pass http://localhost:8831;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
##
# Gzip Settings
##
gzip on;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
на клиенте пытаюсь подключиться через
wss://syn-q.ru/socket
, но получаю ошибку:
Firefox не может установить соединение с сервером wss://syn-q.ru/socket.