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
4. 添加统计代码?
在 resources/views/{主题名} 下创建一个 analytics.tpl,把统计代码贴进去
然后在config/.config.php文件里面把以下设置为true。
$System_Config['enable_analytics_code']='true';
5. 即使开启debug也是500错误:
在public/index.php里面添加
1 2 |
ini_set(<span class="hljs-string">"display_errors"</span>, <span class="hljs-string">"On"</span>); error_reporting(E_ALL | E_STRICT); |
6. php出错提示缺少文件/vendor/autoload.php
运行php composer.phar install
安装依赖文件。
7. 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
删掉。
8. 后台用户列表,在线列表打不开
下载纯真IP文件qqwry.dat
到storage目录。
在网站根目录运行php xcat initQQWry
可以自动下载。如果失败了就手动下吧。
9. php composer.phar install出错
123456 Cannot <span class="hljs-keyword">create</span> <span class="hljs-keyword">cache</span> <span class="hljs-keyword">directory</span>/root/.composer/<span class="hljs-keyword">cache</span>/repo/https<span class="hljs-comment">---packagist.org/, or directory is not writable. Proceeding without cache Cannot create cache directory</span>/root/.composer/<span class="hljs-keyword">cache</span>/files/, <span class="hljs-keyword">or</span> <span class="hljs-keyword">directory</span> <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> writable. Proceeding <span class="hljs-keyword">without</span> <span class="hljs-keyword">cache</span>[ErrorException]is_dir(): open_basedir restriction <span class="hljs-keyword">in</span> effect. <span class="hljs-keyword">File</span>(/root/.composer) <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-keyword">within</span> the allowed <span class="hljs-keyword">path</span>(s):(/home/wwwroot/<span class="hljs-keyword">default</span>:/tmp/:/proc/:/home/wwwroot)
- 如果使用https://lnmp.org/ 的套件,修改
/usr/local/nginx/conf/fastcgi.conf
最后一行,将/root/.composer
添加到open_basedir里面。
之后重启PHP和NGINX服务。
1 2 |
<span class="hljs-attribute">service</span> php-fpm restart service nginx restart |
10. 后端无法连接,提示{"ret":0,"data":"token or source is invalid}
1. 检查mukey
面板配置文件中的muKey是可以设置多个,用逗号隔开。检查key是否正确。
2. 前端开启了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。
3. 转发真实IP
如果使用CloudFlare的cdn,可以在nginx该站点配置文件中的server{}里面添加以下代码,将属于CloudFlare的IP段替换为真实IP。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<span class="hljs-attribute">set_real_ip_from</span> <span class="hljs-number">103.21.244.0</span>/<span class="hljs-number">22</span>; <span class="hljs-attribute">set_real_ip_from</span> <span class="hljs-number">103.22.200.0</span>/<span class="hljs-number">22</span>; <span class="hljs-attribute">set_real_ip_from</span> <span class="hljs-number">103.31.4.0</span>/<span class="hljs-number">22</span>; <span class="hljs-attribute">set_real_ip_from</span> <span class="hljs-number">104.16.0.0</span>/<span class="hljs-number">12</span>; <span class="hljs-attribute">set_real_ip_from</span> <span class="hljs-number">108.162.192.0</span>/<span class="hljs-number">18</span>; <span class="hljs-attribute">set_real_ip_from</span> <span class="hljs-number">131.0.72.0</span>/<span class="hljs-number">22</span>; <span class="hljs-attribute">set_real_ip_from</span> <span class="hljs-number">141.101.64.0</span>/<span class="hljs-number">18</span>; <span class="hljs-attribute">set_real_ip_from</span> <span class="hljs-number">162.158.0.0</span>/<span class="hljs-number">15</span>; <span class="hljs-attribute">set_real_ip_from</span> <span class="hljs-number">172.64.0.0</span>/<span class="hljs-number">13</span>; <span class="hljs-attribute">set_real_ip_from</span> <span class="hljs-number">173.245.48.0</span>/<span class="hljs-number">20</span>; <span class="hljs-attribute">set_real_ip_from</span> <span class="hljs-number">188.114.96.0</span>/<span class="hljs-number">20</span>; <span class="hljs-attribute">set_real_ip_from</span> <span class="hljs-number">190.93.240.0</span>/<span class="hljs-number">20</span>; <span class="hljs-attribute">set_real_ip_from</span> <span class="hljs-number">197.234.240.0</span>/<span class="hljs-number">22</span>; <span class="hljs-attribute">set_real_ip_from</span> <span class="hljs-number">198.41.128.0</span>/<span class="hljs-number">17</span>; <span class="hljs-comment"># 以上代码表示从这些ip发送的请求不是用户真实ip</span> <span class="hljs-attribute">real_ip_header</span> X-Forwarded-For; <span class="hljs-comment"># 将请求头的用户ip替换为代理转发的ip</span> <span class="hljs-attribute">real_ip_recursive</span> <span class="hljs-literal">on</span>; <span class="hljs-comment"># nginx会查找转发链,返回第一个不在以上列表中的ip作为用户真实ip</span> |
- 如果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/。
4. 节点有多个IP(ipv4或ipv6)
节点有多个IPv4,或者配置节点时填写的IPv4,而节点连接时使用IPv6,都会出现无法获取配置的情况。打开sspanel服务器的访问日志,看看是用的哪个ip访问的服务器。然后在节点IP中填写这个IP。
11. 原版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开头
13. 启用Telegram签到,查询等功能
https://wiki.sspanel.host
总共分3步:
13.1 创建TGbot,创建TG群,将Bot加入群。
13.2 修改config/.config.php配置文件
1 2 3 4 5 6 7 8 9 10 11 12 |
<span class="hljs-comment">#telegram bot,是否启用</span> $System_Config[<span class="hljs-string">'enable_telegram'</span>]=<span class="hljs-string">'true'</span>; <span class="hljs-comment">#telegram bot,bot 的 token ,跟 father bot 申请</span> $System_Config[<span class="hljs-string">'telegram_token'</span>]=<span class="hljs-string">'403724326:AAFhkMIVEpkNDCj1R_*************'</span>; <span class="hljs-comment">#telegram bot,群组会话 ID,把机器人拉进群里之后跟他 /ping 一下即可得到。</span> $System_Config[<span class="hljs-string">'telegram_chatid'</span>]=<span class="hljs-string">'-6455161465464'</span>; <span class="hljs-comment">#Telegram 机器人账号</span> $System_Config[<span class="hljs-string">'telegram_bot'</span>]=<span class="hljs-string">'mybot_bot'</span>; |
13.3然后运行php xcat setTelegram
,提示设置成功。
14. 软件下载链接404
首先编辑/usr/local/php/etc/php.ini,将disable_functions里面的system删掉。
在网站根目录运行php xcat initdownload
15.怎么用节点的网址代替ip地址,进入用户中心后,查看节点不再是显示节点的ip
注册一个域名,添加一个IP是节点IP的A记录,就可以了。