nginx配置了WebSocket 谷歌浏览器会报404.

用域名访问项目没问题,用域名访问项目WebSocket功能谷歌浏览器就报
WebSocket connection to 'ws://sodb.qdairport.com/qdsodb/websocket/admin' failed: Error during WebSocket handshake: Unexpected response code: 404
用ip加端口访问项目WebSocket功能可以正常连接上
nginx配置文件

#user nobody;
worker_processes 1;

events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;

#keepalive_timeout  0;
keepalive_timeout  65;
#设置允许上传内容大小
client_max_body_size 200M;
client_body_buffer_size 128k;
gzip  on;

#配置域名和ip
upstream sodb.qdairport.com { 
  server  10.48.1.16:8080 weight=1;  #权重为1
  server  10.48.1.17:8080 weight=1;   #权重为2
} 

server {
     listen       80;
    server_name  sodb.qdairport.com;
    location / { 
    proxy_pass        http://sodb.qdairport.com; 
    proxy_set_header   Host    $host;  
    proxy_set_header   X-Real-IP   $remote_addr;  
    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout       3;
proxy_read_timeout          3600;
proxy_send_timeout          60;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
} 
}

}


http {
#map块为websocket必须配置
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

server {
listen 80;
#配置websocket地址
location /{
proxy_pass http://123.0.1:8081;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
}