sl-im是基于swoft微服务协程框架和layim网页聊天系统 所开发出来的聊天室。
sl-imhttps://im.gaobinzhan.com
compor update
app/bean.php
'db' => [ 'class' => databa::class, 'dsn' => 'mysql:dbname=im;host=127.0.0.1:3306', 'urname' => 'root', 'password' => 'gaobinzhan', 'chart' => 'utf8mb4', ],'db.pool' => [ 'class' => \swoft\db\pool::class, 'databa' => bean('db'), 'minactive' => 5, // 自己调下连接池大小 'maxactive' => 10 ],
php bin/swoft mig:up
vi吉林省高考m .env
# basicapp_debug=0swoft_debug=0# more ...app_host=https://im.gaobinzhan.com/ws_url=ws://im.gaobinzhan.com/im# 是否开启静态处理 这里我关了 让nginx去处理enable_static_handler=fal # swo颁奖典礼流程ole v4.4.0以下版本, 此处必须为绝对路径document_root=/data/wwwroot/im/public
nginx 配置
rver{ listen 80; rver_name im.gaobinzhan.com; return 301 https://$rver_name$request_uri;}rver{ listen 443 ssl; root /data/wwwroot/im/public/; add_header strict-transport-curity "max-age=31536000"; rver_name im.gaobinzhan.com; access_log /data/wwwlog/im-gaobinzhan-com.access.log; error_log /data/wwwlog/im-gaobinzhan-com.error.log; client_max_body_size 100m; ssl_certificate /etc/nginx/ssl/full_chain.pem; ssl_certificate_key /etc/nginx/ssl/private.key; ssl_ssion_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:9091; proxy_t_header host $host:$rver_port; proxy_t_header x-real-ip $remote_addr; proxy_t_header x-real-port $remote_port; proxy_t_header x-forwarded-for $proxy_add_x_forwarded_for; } location /im { proxy_pass http://127.0.0.1:9091; proxy_http_version 1.1; proxy_read_timeout 3600s; proxy_t_header upgrade $http_upgrade; proxy_t_header connection "upgrade"; } locatio色拉n ~ .*\.(js|ico|css|ttf|woff|woff2|png|jpg|jpeg|svg|gif|htm)$ { root /data/wwwroot/im/public; }}
php bin/swoft ws:start
守护进程化
php bin/swoft ws:start -d
访问
怎么访问还用写吗???点个 赞吧
感谢 swoft 团队
php高级开发工程师简历打造,祝你金三银四跳槽加薪
本文发布于:2023-04-08 12:32:00,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/zuowen/266283cf5ce8ee9e18da741776273d5e.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文word下载地址:sl.doc
本文 PDF 下载地址:sl.pdf
留言与评论(共有 0 条评论) |