常见服务器设置
概览
本指南涵盖了ComusThumbz所使用的最常见的托管环境的分步服务器配置. 每个部分提供完整的设置指令,包括PHP配置,网络服务器设置,以及ComusThumbz的特定要求.
支持的环境
HestiaCP 设置
HestiaCP是VPS服务器的受欢迎的自由控制面板. 本设置指南涵盖完整的ComusThumbz安装.
先决条件
- Ubuntu 20.04/22.04 或 Debian 10/11
- 安装了 HestiaCP
- 域指向服务器
- SSH 访问
第1步: 创建网络域
- 登录到 HestiaCP 时间
https://your-server-ip:8083 - 转到 韦伯 选项卡
- 点击 添加网络域
- 输入您的域名
- 启用 SSL 支持 检查 让我们加密
- 点击 保存
[相片:hestiacp-add-domain] (英语).
步骤2: 配置 PHP
- 转到 韦伯 选项卡
- 单击域旁的扳手图标
- 选择 第8.3页 从 PHP 版本下拉
- 点击 保存
步骤 3: 启用所需的前一頁函数
HestiaCP 默认会禁用许多 PHP 函数 。 你必须让他们为ComusThumbz工作。
备选案文A:HestiaCP 小组讨论会
- 转到 公务员 > 翻译: 配置 > 翻译: PHP-FPM 移动
- 查找您的 PHP 版本( 如 PHP 8. 3)
- 地点
disablefunctions在配置中 - 从禁用列表中删除这些函数 :
exec
shellexecpassthruprocopenpopen
- 点击 保存
- 重新启动 PHP : 在 SSH 中, 运行
systemctl restart php8.3-fpm
备选案文B:通过SSH(建议)
查找已禁用函数行(约314行)
从 :
更改为( 取消执行 、 通过 、 空壳 )执行,Proc打开, 打开 :
保存并重新启动 PHP- FPM
步骤 4: 调整 PHP 设置
更新这些设置 :
保存并重新启动
步骤5:安装FFmpeg
验证安装
步骤6:安装图像Magick(可选)
第7步:上传ComusThumbz文件
Via 文件管理器 :
在HestiaCP, 转到 图表
- 导航到
/home/username/web/yourdomain.com/publichtml/ - 上传并提取 ComusThumbz 文件
(原始内容存档于2018-03-29). Via SFTP:
主机: 您的服务器
用户名: 您的 HestiaCP 用户
密码: 您的 HestiaCP 密码
Upload to: /home/username/web/yourdomain.com/public_html/
步骤8:设置权限
设定所有权
设置基本权限
使上传/ 日志目录可写入
第9步:设置 Cron 任务
- SSH 进入您的服务器
- 运行 :
crontab -e - 添加此行 :
第10步: 运行安装器
- 导航到
https://yourdomain.com/install/ - 跟随安装向导
- 删除
/install/完成后文件夹
您的 HestiaCP 服务器现已配置为 ComusThumbz !
c小组/ WHM 设置
cPanel是最常见的共享主机控制面板. 本指南涵盖与cPanel共用和VPS托管的设置.
先决条件
- c 小组托管账户
- PHP 8.0+ 可选
- SSH 访问( 可选但推荐)
第 1 步: 选择首选项版本
- 登录到 cPanel
- 转到 软件 > 翻译: 多 PHP 管理器
- 选择您的域
- 选择 第8.3页 (或最高可用8.x)
- 点击 应用
[相机:cpanel-php-version] (中文(简体) ).
第2步: 配置 PHP 设置
- 转到 软件 > 翻译: MultiPHP INI 编辑器
- 选择 编辑器模式
- 选择您的域
- 更新这些设置 :
memorylimit = 512Mmaxexecutiontime = 600uploadmaxfilesize = 500Mpostmaxsize = 500Mmaxinputvars = 10000
- 点击 保存
步骤 3: 启用 PHP 函数
在共享托管时, 您可能无法启用已禁用功能 。 如果这些功能被禁用, 请联系您的主机 。
如果你有WHM访问:
- 登录到 WHM
- 转到 服务配置 > 翻译: 前一頁 配置编辑器
- 查找
disablefunctions - 删除 :
exec, shellexec, passthru, procopen, popen - 保存并重建 PHP
关于共享托管:
联系您的主机提供商为您的账户启用这些功能 。
步骤 4: 上传文件
转到 文件 > 翻译: 文件管理器
- 导航到
publichtml/ - 点击 上传
- 上传并提取 ComusThumbz 文件
或使用 FTP :
- 主机:您domain.com或ftp.yourdomain.com 页面存档备份,存于互联网档案馆.
- 用户名: 您的 cPanel 用户名
- 密码:您的 cPanel 密码
第5步:建立数据库
- 转到 数据库 > 翻译: MySQL 数据库
- 创建一个新的数据库(例如,
usernamecomus(中文(简体) ). - 创建一个密码很强的新用户
- 将用户添加到数据库 所有特权
第6步: 设置 Cron 任务
转到 高级 > 翻译: Cron 任务
- 设定时间表 :
(每分钟) - 命令 :
- 点击 添加新编程任务
第7步:运行安装器
导航到 https://yourdomain.com/install/ 并完成安装。
Plesk 设置
Plesk是VPS和专用服务器的流行控制面板.
步骤1:添加域
- 登录到 Plesk
- 转到 网站和域数
- 点击 添加域
- 输入您的域并配置设置
- 启用 SSL/TLS 支持
步骤2: 配置 PHP
- 转到 网站和域数 > 您的域 > 前一頁 设置
- 设定 前一頁 版本 改为8.3
- 配置 :
memorylimit = 512Mmaxexecutiontime = 600uploadmaxfilesize = 500Mpostmaxsize = 500M
- 点击
步骤 3: 启用 PHP 函数
- 转到 前一頁 设置 用于您的域
- 查找 其他指示 节
- 添加:
(Empty 值删除所有已禁用的函数)
- 或者通过从禁用列表中删除特定功能来有选择地启用
步骤 4: 安装 FFmpeg
维娅・SSH:
CentOS 服务器
第5步:设置 Cron 任务
- 转到 网站和域数 > 您的域 > 计划任务
- 点击 添加任务
- 时间表:每分钟
(中文(简体) ). - 命令 :
第6步:上传并安装
- 通过 FTP 或文件管理器上传文件
- 设置权限
- 运行安装器于
https://yourdomain.com/install/
Ubuntu + Apache( 手动设置)
用于VPS或没有控制面板的专用服务器.
步骤1:更新系统
第2步:安装Apache
步骤3:安装PHP 8.3
Install PHP and extensions
Enable PHP-FPM with Apache
Step 4: Install MySQL/MariaDB
Create database and user
Step 5: Install FFmpeg
Step 6: Configure PHP
Update these settings:
Step 7: Configure Apache Virtual Host
Step 8: Install SSL (Let's Encrypt)
Step 9: Upload ComusThumbz
Upload files (via SCP, SFTP, or wget)
... upload files ...
Set ownership
Set permissions
Step 10: Set Up Cron Job
Add:
Ubuntu + Nginx Setup
Nginx is recommended for high-traffic sites due to its efficient handling of static files and concurrent connections.
Step 1: Install Nginx and PHP
Install PHP-FPM
Step 2: Configure Nginx
Step 3: Configure PHP-FPM
Update settings as shown in the Apache section, then:
Step 4: Install SSL
Step 5: Continue with Steps 4-10 from Apache Guide
(Database setup, FFmpeg, upload files, permissions, cron)
CentOS / AlmaLinux Setup
Step 1: Install EPEL and Required Repositories
Enable Remi PHP 8.3
Step 2: Install Apache, PHP, and Extensions
Step 3: Install MariaDB
Step 4: Install FFmpeg
Step 5: Configure PHP
Update settings as described in previous sections.
Step 6: Configure SELinux (if enabled)
Allow Apache to write to upload directories
Step 7: Configure Firewall
Troubleshooting Common Setup Issues
"exec() has been disabled" Error
Symptoms: Video processing fails, FFmpeg errors.
Solution: Enable exec() in PHP configuration. See platform-specific instructions above.
"Permission denied" Errors
Symptoms: Cannot upload files, cannot save settings.
Solution:
Cron Job Not Running
Symptoms: Videos stay in "pending" status.
Verify cron:
Check cron log
Test manually
500 Internal Server Error
Symptoms: Blank page or 500 error.
Solutions:
- Check PHP error log:
tail -f /path/to/ct/logs/php-error.log - Check Apache/Nginx error log
- Verify
.htaccessis valid - Check file permissions
API Returns 404
Symptoms: REST API endpoints return 404.
Apache: Ensure modrewrite is enabled and AllowOverride All is set.
Nginx: Ensure the API rewrite rule is in your server block:
Related Documentation
- Requirements Guide - Complete system requirements
- Welcome Guide - Getting started overview
- Installation Guide - Step-by-step installation
- Settings Control Center - Master configuration
Changelog