下载量:42

资源名:xchat.zip
上传于:2021.05.05 11:13
更新于:2021.05.20 11:37

Star以示支持:https://github.com/vangxh/xchat

问题交流群:375181296


DEMO说明

此demo为最早整理的单商户版本。

仓促整理、错误难免,已经过上传后下载简单测试。

仅供参考学习使用


布署说明

1、创建xchat数据库,导入xchat.sql

2、配置nginx

server {
    listen 80;
    # 你的域名或虚拟host或ip
    server_name chat.me;

    root d:/CmdTool/project/xchat/public; # 你的xhcat路径
    index index.php;

    # 静态文件
    location ~ ^/(?:static|upload)/ {
        expires 10d;
    }

    location / {
        if (!-e $request_filename) {
            rewrite ^(.*)$ /index.php?s=$1 last;
        }
    }

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param   PATH_INFO       $fastcgi_path_info;
        fastcgi_pass    127.0.0.1:9000;
        include         fastcgi_params;
    }

    # socket
    location ~ ^/ws$ {
        proxy_pass http://127.0.0.1:8011;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header X-Real-IP $remote_addr;
        proxy_redirect off;
    }
}

3、windows下运行

cd xchat
chat.bat

4、linux下运行

cd xchat
php chat.php start -d

5、打开浏览器查看

// 访客端
http://chat.me

// 客服端
http://chat.me/index/kefu