Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure https connection in websocket

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article shows you how to configure https connection in websocket, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Websocket address

'wss://hongonew.com/hone/web/websocket/'

Nginx configuration

Server {listen 443 ssl; server_name hongonew.com; ssl on; ssl_certificate * *; ssl_certificate_key * *; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH Location ~ / hone/ {proxy_pass http://127.0.0.1:8080; index dashboard index; # websocket additional configuration starts proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade Proxy_set_header Connection "upgrade"; proxy_connect_timeout 60sbetweenl connection timeout. If you cannot set it too long, it will waste connection resources proxy_read_timeout 500sbot # read timeout proxy_send_timeout 500s # write timeout # websocket additional configuration ends proxy_set_header Host $http_host; 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 logs/https_access.log; error_log logs/https_error.log;} the above is how to configure https connections in websocket. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report