aiastia / note

笔记
17 stars 5 forks source link

SSpanel Mod V3 魔改版问题记录 #33

Open aiastia opened 5 years ago

aiastia commented 5 years ago
  1. 启用HTTPS后提示ERR_SSL_PROTOCOL_ERROR 在虚拟服务器配置文件的listen指令后添加default_server

    listen 443 default_server ssl;
  2. 重定向过多 设置config/.config.php中打开debug,查看错误原因

  3. Redis报错 "AUTH" failed: ERR Client sent AUTH, but no password is set

给redis设置密码:可以在配置文件中设置,永久有效;也可以使用redis命令行工具一次有效。 找到配置文件redis.conf,在其中找到reqiurepass,确保它前面没有#号,在后面加上空格,输入密码。 启动redis时,要指定配置文件,否则还是没有密码。./redis-server redis.conf

  1. 添加统计代码? 在 resources/views/{主题名} 下创建一个 analytics.tpl,把统计代码贴进去 然后在config/.config.php文件里面把以下设置为true。 $System_Config['enable_analytics_code']='true';

  2. 即使开启debug也是500错误: 在public/index.php里面添加

ini_set("display_errors", "On"); error_reporting(E_ALL | E_STRICT);

  1. php出错提示缺少文件/vendor/autoload.php 运行php composer.phar install安装依赖文件。

  2. Composer 报错 Failed to download xxx/yyy from source: The Process class relies on proc_open, which is not available on your PHP installation.Now trying to download from dist

php禁用了proc_open,于是程序使用了另一种方式下载。如果没有安装成功就启用proc_open函数。 编辑php.ini,把disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait...里面的proc_open删掉。

  1. 后台用户列表,在线列表打不开 下载纯真IP文件qqwry.dat到storage目录。 在网站根目录运行php xcat initQQWry可以自动下载。如果失败了就手动下吧。 这里有最新版,下完了记得改名为qqwry.dat。

  2. php composer.phar install出错 Cannot create cache directory /root/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache Cannot create cache directory /root/.composer/cache/files/, or directory is not writable. Proceeding without cache [ErrorException] is_dir(): open_basedir restriction in effect. File(/root/.composer) is not within the allowed path(s): (/home/wwwroot/default:/tmp/:/proc/:/home/wwwroot) 如果使用https://lnmp.org/ 的套件,修改/usr/local/nginx/conf/fastcgi.conf最后一行,将/root/.composer添加到open_basedir里面。 之后重启PHP和NGINX服务。 service php-fpm restart service nginx restart

  3. 后端无法连接,提示{"ret":0,"data":"token or source is invalid}

  4. 检查mukey 面板配置文件中的muKey是可以设置多个,用逗号隔开。检查key是否正确。

  5. 前端开启了CDN 连接API的IP只能是127.0.0.1或者设置的节点IP。如果开启了cdn,可能导致节点服务器向前端发送的请求IP被替换成了CDN的IP,从而导致无法通过验证。

在节点服务器用curl https://你的站点地址/mod_mu/func/ping?key=设置的muKey,如果响应为{"ret":1,"data":"pong"}那么就成功了,无需进行下面转发真实IP的操作

如果curl提示(53) SSL Connect Error,更新curl。

  1. 转发真实IP 如果使用CloudFlare的cdn,可以在nginx该站点配置文件中的server{}里面添加以下代码,将属于CloudFlare的IP段替换为真实IP。
    set_real_ip_from 103.21.244.0/22;
    set_real_ip_from 103.22.200.0/22;
    set_real_ip_from 103.31.4.0/22;
    set_real_ip_from 104.16.0.0/12;
    set_real_ip_from 108.162.192.0/18;
    set_real_ip_from 131.0.72.0/22;
    set_real_ip_from 141.101.64.0/18;
    set_real_ip_from 162.158.0.0/15;
    set_real_ip_from 172.64.0.0/13;
    set_real_ip_from 173.245.48.0/20;
    set_real_ip_from 188.114.96.0/20;
    set_real_ip_from 190.93.240.0/20;
    set_real_ip_from 197.234.240.0/22;
    set_real_ip_from 198.41.128.0/17; # 以上代码表示从这些ip发送的请求不是用户真实ip
    real_ip_header    X-Forwarded-For; # 将请求头的用户ip替换为代理转发的ip
    real_ip_recursive on; # nginx会查找转发链,返回第一个不在以上列表中的ip作为用户真实ip

    如果nginx提示没有readip模块,则需要重新编译安装。加上参数--with-http_realip_module。

https://lnmp.org 的LNMP套件可以很方便地重新编译安装,在lnmp/lnmp.conf里面修改Nginx_Modules_Options='--with-http_realip_module',然后./upgrade.sh nginx即可。 此方法来自https://www.cmsky.com/lnmp-nginx-realip/。

  1. 节点有多个IP(ipv4或ipv6) 节点有多个IPv4,或者配置节点时填写的IPv4,而节点连接时使用IPv6,都会出现无法获取配置的情况。打开sspanel服务器的访问日志,看看是用的哪个ip访问的服务器。然后在节点IP中填写这个IP。

  2. 原版ss怎么设置 11.1 服务器端 加密方式,前面带[SS 可连接]的都可以,推荐以下几种:

[SS 可连接] aes-128-gcm [SS 可连接] aes-192-gcm [SS 可连接] aes-256-gcm [SS 可连接] chacha20-ietf-poly1305 [SS 可连接] xchacha20-ietf-poly1305 协议:origin 混淆:

[SS 可连接] simple_obfs_http [SS 可连接] simple_obfs_tls 11.2 PC 下载原版安装文件 下载obfs插件,放到同一文件夹 添加服务器界面设置插件,参数中的obfs可选参数为http和tls,与服务器端的混淆一致。 插件:plugin: obfs-local 插件参数:obfs=http;obfs-host=www.baidu.com 直接扫二维码添加,会自动添加插件配置。

11.3 安卓 在play市场下载原版并安装 在play市场下载Simple Obfuscation 在服务器详情界面添加插件并进行配置 12.php xcat setTelegram提示‘bad request’错误 确认网站已开启https config/.config.php文件里面的站点地址也必须是https开头

  1. 启用Telegram签到,查询等功能 https://www.hengmt.com/408.html-打不开了https://91vps.win/2017/07/28/tg_mod/ 也挂了,还好有缓存。

总共分3步:

13.1 创建TGbot,创建TG群,将Bot加入群。 13.2 修改config/.config.php配置文件

telegram bot,是否启用

$System_Config['enable_telegram']='true';

telegram bot,bot 的 token ,跟 father bot 申请

$System_Config['telegramtoken']='403724326:AAFhkMIVEpkNDCj1R*****';

telegram bot,群组会话 ID,把机器人拉进群里之后跟他 /ping 一下即可得到。

$System_Config['telegram_chatid']='-6455161465464';

Telegram 机器人账号

$System_Config['telegram_bot']='mybot_bot'; 13.3然后运行php xcat setTelegram,提示设置成功。

  1. 软件下载链接404 首先编辑/usr/local/php/etc/php.ini,将disable_functions里面的system删掉。 在网站根目录运行php xcat initdownload