99客服系统源码安装教程

客服系统源码安装教程。

安装

环境要求:php>=5.4, MySQL 5.x

宝塔安装

推荐nginx+php-fpm模式

1、新建站点后网站目录配置参考如下

注意:网站目录指向99kf-web,运行目录指向/public。

2、配置文件配置

在如图箭头位置加入以下配置

    location /kf/h5 {
      try_files $uri $uri/ /kfh5.html?$args;
    }

    location /kf/web {
      try_files $uri $uri/ /kfweb.html?$args;
    }

    location /h5 {
      try_files $uri $uri/ /h5.html?$args;
    }

    location /web {
      try_files $uri $uri/ /web.html?$args;
    }

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

    location ~* \.(eot|ttf|woff)$ {
        add_header Access-Control-Allow-Origin *;
    }

    # 为了保证安全,这里的php文件不允许执行
    location ~ \/static\/.*\.php {
        deny all;
        return 404;
    }

    # 为了保证安全,这里的php文件不允许执行
    location ~ \/upload\/.*\.php {
        deny all;
        return 404;
    }

最终配置类似如下:

server
{
    listen 80;
    server_name 99kf.com;
    index index.php index.html index.htm default.php default.htm default.html;
    root /www/wwwroot/99kf.com/99kf-web/public;

    #SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
    #error_page 404/404.html;
    #SSL-END

    #ERROR-PAGE-START  错误页配置,可以注释、删除或修改
    #error_page 404 /404.html;
    #error_page 502 /502.html;
    #ERROR-PAGE-END

    #######################################
    location /kf/h5 {
      try_files $uri $uri/ /kfh5.html?$args;
    }

    location /kf/web {
      try_files $uri $uri/ /kfweb.html?$args;
    }

    location /h5 {
      try_files $uri $uri/ /h5.html?$args;
    }

    location /web {
      try_files $uri $uri/ /web.html?$args;
    }

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

    location ~* \.(eot|ttf|woff)$ {
        add_header Access-Control-Allow-Origin *;
    }

    # 为了保证安全,这里的php文件不允许执行
    location ~ \/static\/.*\.php {
        deny all;
        return 404;
    }

    # 为了保证安全,这里的php文件不允许执行
    location ~ \/upload\/.*\.php {
        deny all;
        return 404;
    }
    #######################################

    #PHP-INFO-START  PHP引用配置,可以注释或修改
    include enable-php-56.conf;
    #PHP-INFO-END

    #REWRITE-START URL重写规则引用,修改后将导致面板设置的伪静态规则失效
    include /www/server/panel/vhost/rewrite/kefu.com.conf;
    #REWRITE-END

    #禁止访问的文件或目录
    location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
    {
        return 404;
    }

    #一键申请SSL证书验证目录相关设置
    location ~ \.well-known{
        allow all;
    }

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
        expires      30d;
        error_log off;
        access_log /dev/null;
    }

    location ~ .*\.(js|css)?$
    {
        expires      12h;
        error_log off;
        access_log /dev/null;
    }
    access_log  /www/wwwlogs/kefu.com.log;
    error_log  /www/wwwlogs/kefu.com.error.log;
}

3、访问 http://你的域名.com/install.php

根据步骤检测环境并填写数据库配置即可完成安装。安装指引页面类似如下

安装指引

安装完毕即可使用

非宝塔环境 nginx配置参考

1、nginx配置参考如下:

server {
    listen 80;
    server_name  99kf.com;
    root 实际磁盘路径/99kf-web/public;
    client_max_body_size 18M;

    location /kf/h5 {
      try_files $uri $uri/ /kfh5.html?$args;
    }

    location /kf/web {
      try_files $uri $uri/ /kfweb.html?$args;
    }

    location /h5 {
      try_files $uri $uri/ /h5.html?$args;
    }

    location /web {
      try_files $uri $uri/ /web.html?$args;
    }

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

    location ~* \.(eot|ttf|woff)$ {
        add_header Access-Control-Allow-Origin *;
    }

    # 为了保证安全,这里的php文件不允许执行
    location ~ \/static\/.*\.php {
        deny all;
        return 404;
    }

    # 为了保证安全,这里的php文件不允许执行
    location ~ \/upload\/.*\.php {
        deny all;
        return 404;
    }

    location ~ \.php$ {
       ##### fastcgi_pass 配置不同环境的值不同,具体值参考php-fpm配置中listen字段
       fastcgi_pass    127.0.0.1:9000;
       include fastcgi_params;
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}

2、 打开php.ini文件并修改以下选项

upload_max_filesize = 20M

post_max_size = 20M

重启php-fpm

3、 访问 http://你的域名.com/install.php

根据步骤检测环境并填写数据库配置即可完成安装。安装指引页面类似如下

安装指引

非宝塔环境 apache配置参考

参考如下(需要httpd.conf配置文件中加载了mod_rewrite.so模块)

1、apache配置

<Directory "实际磁盘路径/99kf-web/public">
     Header set Access-Control-Allow-Origin "*"
     Options Indexes MultiViews
     AllowOverride All
     Require all granted
 </Directory>
 <VirtualHost *:80>
     DocumentRoot "实际磁盘路径/99kf-web/public"
     ServerName popoim.com
 </VirtualHost>

2、 打开php.ini文件并修改以下选项

upload_max_filesize = 20M

post_max_size = 20M

重启Apache

3、 访问 http://你的域名.com/install.php

根据步骤检测环境并填写数据库配置即可完成安装。安装指引页面类似如下

安装指引

客服系统源码 购买地址 https://www.99kf.com