使用QuickBox中的问题记录

使用QuickBox中的问题记录

QucikBox是一款非常好用的盒子安装脚本,集成了apache2+h5ai的web界面,可选qBittorrent/Deluge/rTorrent+ruTorrent/Transmission等bt软件,安装简单功能齐全界面好看,居家PT必备
同时还有Plex/Quotas/vsftp/mktorrent/Web Console等非常实用的服务
分配磁盘,安装证书之后可以实现https方式远程管理,ftp/h5/Plex等方式看服务器上的影片同时做种
这里记录几个遇到的问题和解决方案

开源库:https://github.com/QuickBox/

问题一:rutorrent配置出错

问题描述:Dashboard没有rutorrent的选项,通过网址访问后提示rtorrent可能未运行,ssh登陆后发现rtorrent正在运行,并不是未安装或者停止运行

感觉只是两者无法通信,查看配置文件寻找问题,最后发现是所购的vps的本地ip不是默认的127.0.0.1,而是10.37.*.*
而安装过程中没有配置localhost的具体指向,rutorrent无法通信。解决方法如下:

  • 配置rtorrent
    编辑nano /home/greedbob/.rtorrent.rc
    其中有一个地方需要修改network.scgi.open_port = localhost:16402
    其中greedbob是我的用户名,修改为你的用户名,将localhost改为vps在子网的ip地址,比如10.37.\*.\*

  • 配置rutorrent
    编辑配置文件nano /srv/rutorrent/conf/users/greedbob/config.php
    $scgi_host = "localhost";$localhosts = array("127.0.0.1", "localhost",);中的localhost修改为vps在子网的ip地址。
    之后reload,重启即可。

问题二:h5ai没有运行

问题描述:打开服务器下载文件夹,比如https://www.***.com/greedbob.rtorrent.downloads/。发现界面是apache2自动生成的文件目录形式,而非h5ai生成的界面。

这个问题解决很简单,在查看apache2的配置文件后发现,没有指定h5ai的php文件为主页。
所以编辑dir.conf文件nano /etc/apache2/mods-available/dir.conf

1
2
3
<IfModule mod_dir.c>
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>

改为

1
2
3
<IfModule mod_dir.c>
DirectoryIndex /_h5ai/public/index.php
</IfModule>

之后重启apache2即可/etc/init.d/apache2 restart

问题三:nginx下更换ssl证书(QBLite使用了nginx而非Apache)

.me的域名到期的deadline,我才匆匆开始迁移DNS记录,挂cf强行鸽了两天之后,我开始配置域名变化带来的一系列问题,其中就包括给盒子换域名和ssl证书。

首先使用certbot-auto生成了Let’s Encrypt提供的免费ssl证书:

1
2
3
4
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
service nginx stop
./certbot-auto certonly

根据bot提示,即可顺利再/etc/letsencrypt/archive生成证书文件。

之后修改nginx配置文件nano /etc/nginx/sites-enabled/default,修改server_name为正确的域名,修改ssl_certificatessl_certificate_key为正确的证书文件:

1
2
3
4
5
6
7
8
9
10
11
12
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name op.greedfox.com;
ssl_certificate /etc/nginx/ssl/op.greedfox.com/fullchain1.pem;
ssl_certificate_key /etc/nginx/ssl/op.greedfox.com/privkey1.pem;
include snippets/ssl-params.conf;
client_max_body_size 40M;
server_tokens off;
root /srv/;

index index.html index.php index.htm;

之后nginx -t检查配置文件:

1
2
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

一切正常,service nginx start启动nginx即可。

这里需要注意的是,如果想复制证书文件到别的地方,一定要复制/etc/letsencrypt/archive下的证书,我一开始复制了/etc/letsencrypt/live文件夹到nginx/site-enabled文件夹下,然后修改了nginx配置,结果重启nginx时发现报错nginx: [crit] pread() "/etc/nginx/" failed (21: Is a directory)
原因就是/etc/letsencrypt/live下的文件均为软链接到/etc/letsencrypt/archive下的文件,因此复制/live文件夹会导致采用相对目录的软连接失效,导致nginx找不到证书文件。

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×