nginx ssl websocket

map $http_upgrade $connection_upgrade {  
    default upgrade;  
    '' close;  
}

server {
  listen 443 ssl;
  server_name lattice.notbucai.com;

  ssl_certificate /etc/nginx/keys/lattice/ssl.crt;
  ssl_certificate_key /etc/nginx/keys/lattice/ssl.key;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  ssl_ciphers ALL:!DH:!EXPORT:!RC4:+HIGH:+MEDIUM:!eNULL;
  ssl_prefer_server_ciphers on;

  location / {
    proxy_pass http://bucai-lattice:2293;
    proxy_set_header Origin $http_HEADER_Origin;
    proxy_read_timeout 18000;
    proxy_set_header Upgrade $http_upgrade;  
    proxy_set_header Connection "Upgrade";  
  }

}
server {
    listen 80;
    server_name lattice.notbucai.com;
    rewrite ^(.*)$ https://$host$1 permanent;
}

发表评论

请先登陆

  1. bucai

    Sat Nov 30 2019 19:46:34 GMT+0800 (GMT+08:00)

    @ system-admin ---
    回复
  2. bucai

    Sat Nov 30 2019 19:45:06 GMT+0800 (GMT+08:00)

    @ system-admin -.-
    回复
  3. system-admin

    Fri Nov 22 2019 15:01:37 GMT+0800 (GMT+08:00)

    0.0
    回复