# springboot-websocket **Repository Path**: bingoochen/springboot-websocket ## Basic Information - **Project Name**: springboot-websocket - **Description**: springboot-websocket - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-09-12 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 测试 - [http://localhost:8080/index.html](http://localhost:8080/index.html) #### nginx配置 ``` #user nobody; worker_processes 1; error_log /Users/chenxubing/logs/nginx/error.log; error_log /Users/chenxubing/logs/nginx/error.log notice; error_log /Users/chenxubing/logs/nginx/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $upstream_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"' ; access_log /Users/chenxubing/logs/nginx/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; gzip on; upstream ws1 { server 127.0.0.1:8090 weight=2; server 127.0.0.1:8080 weight=1; } server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location /gs-guide-websocket/ { index index.html index.php; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_pass http://ws1; 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_cookie_path /gs-guide-websocket/ /; proxy_set_header Cookie $http_cookie; } location / { root "/Users/chenxubing/workspace/gitee/html"; index index.html index.htm; } } } ```