基于 hyperf 微服务框架 +layim 开发的一套聊天系统!
发布时间:2020-12-13 21:04:11 所属栏目:PHP教程 来源:网络整理
导读:简介 hyperf-im?是基于?Hyperf?微服务协程框架和?Layim?网页聊天系统 所开发出来的聊天室。 体验地址 hyperf-im?im.jayjay.cn 功能 Github hyperf-im 登录注册(Http) 单点登录(Websocket) 私聊(Websocket) 群聊(Websocket) 在线人数(Websocket) 获
简介hyperf-im?是基于?Hyperf?微服务协程框架和?Layim?网页聊天系统 所开发出来的聊天室。 体验地址hyperf-im?im.jayjay.cn 功能Github hyperf-im
Requirement
部署方式Composer
env 配置vim .env WS_URL=wss://im.jayjay.cn/im APP_URL=https://im.jayjay.cn STORAGE_IMG_URL= STORAGE_FILE_URL=
? nginx 配置server{ listen 80; server_name im.jayjay.cn; return 301 https://$server_name$request_uri; } server{ listen 443 ssl; root /data/wwwroot/; add_header Strict-Transport-Security "max-age=31536000"; server_name im.jayjay.cn; access_log /data/wwwlog/im.jayjay.cn.access.log; error_log /data/wwwlog/im.jayjay.cn.error.log; client_max_body_size 100m; ssl_certificate /etc/nginx/ssl/full_chain.pem; ssl_certificate_key /etc/nginx/ssl/private.key; ssl_session_timeout 5m; ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; location / { proxy_pass http://127.0.0.1:9501; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-PORT $remote_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /im { proxy_pass http://127.0.0.1:9502; proxy_http_version 1.1; proxy_read_timeout 3600s; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location ~ .*.(js|ico|css|ttf|woff|woff2|png|jpg|jpeg|svg|gif|htm)$ { root /data/wwwroot/IM/public; } }
Start
php bin/hyperf.php start
TODO1. 完善整体项目 ? 更多内容请访问: 腾讯T3-T4标准精品PHP架构师教程目录大全,只要你看完保证薪资上升一个台阶(持续更新) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |