ComusThumbz Documentation
Admin Login

Common Server Setups

Overview

This guide covers step-by-step server configuration for the most common hosting environments used with ComusThumbz. Each section provides complete setup instructions including PHP configuration, web server setup, and ComusThumbz-specific requirements.

Configuration Required:
Before proceeding, ensure your server meets the minimum requirements outlined in the Requirements Guide.

Supported Environments

ГоловнаКомплексністьКращий дляPHP Налаштування
ГестикапЛегкийVPS, виділені сервериПовний доступ
cPanel/WHMЛегкийVPS хостингОбмежено до MultiPHP
ПлескЛегкийVPS, виділені сервериПовний доступ
Статус на сервериСереднійVPS, хмарні сервериПовний доступ
УкраїнськаСереднійVPS, хмарні сервериПовний доступ
Центри / AlmaLinuxСереднійПідприємство, виділенеПовний доступ
ДокерГоловнаРозробка, масштабуванняПовний контроль
ХмариЛегкийХмарний хмараДоступ до панелі

Набір HestiaCP

HestiaCP - це популярна безкоштовна панель керування для серверів VPS. Цей посібник з налаштування охоплює повну установку ComusThumbz.

Вимоги

  • English, Українська, Français...
  • HestiaCP встановлений
  • Статус на сервери
  • SSH доступ

Крок 1: Створити домен

  1. Log in to HestiaCP at https://your-server-ip:8083
  2. Go to WEB tab
  3. Click Add Web Domain
  4. Enter your domain name
  5. Enable SSL Support and check Let's Encrypt
  6. Click Save

[Screenshot: hestiacp-add-domain]

Step 2: Configure PHP

  1. Go to WEB tab
  2. Click the wrench icon next to your domain
  3. Select PHP 8.3 from the PHP version dropdown
  4. Click Save

Step 3: Enable Required PHP Functions

Warning:
HestiaCP disables many PHP functions by default. You MUST enable them for ComusThumbz to work.

Option A: Via HestiaCP Panel

  1. Go to SERVER > Configure > PHP-FPM
  2. Find your PHP version (e.g., PHP 8.3)
  3. Locate disablefunctions in the configuration
  4. Remove these functions from the disabled list:

exec

  • shellexec
  • passthru
  • procopen
  • popen
  1. Click Save
  2. Restart PHP: In SSH, run systemctl restart php8.3-fpm

Option B: Via SSH (Recommended)

# Edit PHP configuration
sudo nano /etc/php/8.3/fpm/php.ini

Find disablefunctions line (around line 314)

Change FROM:

disablefunctions = exec,passthru,shellexec,system,procopen,popen,...

Change TO (remove exec, passthru, shellexec, procopen, popen):

disablefunctions = system,...

Save and restart PHP-FPM

sudo systemctl restart php8.3-fpm

Step 4: Adjust PHP Settings

# Edit PHP configuration
sudo nano /etc/php/8.3/fpm/php.ini

Update these settings:

memorylimit = 512M
maxexecutiontime = 600
uploadmaxfilesize = 500M
postmaxsize = 500M
maxinputvars = 10000

Save and restart

sudo systemctl restart php8.3-fpm

Step 5: Install FFmpeg

sudo apt update
sudo apt install ffmpeg

Verify installation

ffmpeg -version
which ffmpeg  # Should return /usr/bin/ffmpeg

Step 6: Install ImageMagick (Optional)

sudo apt install imagemagick php8.3-imagick
sudo systemctl restart php8.3-fpm

Step 7: Upload ComusThumbz Files

Via File Manager:

In HestiaCP, go to FILES

  1. Navigate to /home/username/web/yourdomain.com/publichtml/
  2. Upload and extract ComusThumbz files

Via SFTP:

# Connect with SFTP client (FileZilla, WinSCP)

Host: your-server-ip
Username: your HestiaCP user
Password: your HestiaCP password
Upload to: /home/username/web/yourdomain.com/public_html/

Step 8: Set Permissions

# SSH into your server
cd /home/username/web/yourdomain.com/publichtml

Set ownership

chown -R username:username ct/

Set base permissions

find ct/ -type d -exec chmod 755 {} \;
find ct/ -type f -exec chmod 644 {} \;

Make upload/log directories writable

chmod -R 775 ct/logs ct/uploads ct/cache
chmod 777 ct/uploads/temp ct/uploads/temp/useruploads

Step 9: Set Up Cron Job

  1. SSH into your server
  2. Run: crontab -e
  3. Add this line:
/usr/bin/php /home/username/web/yourdomain.com/publichtml/ct/admin/cron/sitecron.php >> /home/username/web/yourdomain.com/publichtml/ct/logs/cron/sitecron.log 2>&1
OR
php /home/username/web/yourdomain.com/publichtml/ct/admin/cron/sitecron.php >> /home/username/web/yourdomain.com/publichtml/ct/logs/cron/sitecron.log 2>&1

Step 10: Run Installer

  1. Навігація https://yourdomain.com/install/
  2. Дотримуйтесь установки майстра
  3. Видалити /install/ папка після завершення
Успіх:
Сервер HestiaCP тепер налаштований для ComusThumbz!

cPanel/WHM Setup

cPanel - найбільш поширена панель керування хостингом. Цей посібник охоплює налаштування як для спільного, так і VPS хостингу з cPanel.

Вимоги

  • Статус на сервери
  • PHP 8.0+ доступний
  • Доступ SSH (за бажанням)

Крок 1: Виберіть версію PHP

  1. Увійти до cPanel
  2. Перейти до вмісту Програмне забезпечення Головна > Менеджер по роботі з клієнтами
  3. Виберіть домен
  4. Обрати English, Українська, Français... (або найвищий доступ 8.x)
  5. Зареєструватися Застосувати

[Screenshot: cpanel-php-version]

Крок 2: Налаштування параметрів PHP

  1. Go to Software > MultiPHP INI Editor
  2. Select Editor Mode
  3. Choose your domain
  4. Update these settings:
  • memorylimit = 512M
  • maxexecutiontime = 600
  • uploadmaxfilesize = 500M
  • postmaxsize = 500M
  • maxinputvars = 10000
  1. Click Save

Step 3: Enable PHP Functions

Warning:
On shared hosting, you may not have access to enable disabled functions. Contact your host if these functions are disabled.

If you have WHM access:

  1. Log in to WHM
  2. Go to Service Configuration > PHP Configuration Editor
  3. Find disablefunctions
  4. Remove: exec, shellexec, passthru, procopen, popen
  5. Save and rebuild PHP

On shared hosting:
Contact your hosting provider to enable these functions for your account.

Step 4: Upload Files

Go to Files > File Manager

  1. Navigate to publichtml/
  2. Click Upload
  3. Upload and extract ComusThumbz files

Or use FTP:

  • Host: yourdomain.com or ftp.yourdomain.com
  • Username: your cPanel username
  • Password: your cPanel password

Step 5: Set Up Database

  1. Go to Databases > MySQL Databases
  2. Create a new database (e.g., usernamecomus)
  3. Create a new user with a strong password
  4. Add user to database with ALL PRIVILEGES

Step 6: Set Up Cron Job

Go to Advanced > Cron Jobs

  1. Set schedule: (every minute)
  2. Command:
/usr/bin/php /home/username/web/yourdomain.com/publichtml/ct/admin/cron/sitecron.php >> /home/username/web/yourdomain.com/publichtml/ct/logs/cron/sitecron.log 2>&1
OR
php /home/username/web/yourdomain.com/publichtml/ct/admin/cron/sitecron.php >> /home/username/web/yourdomain.com/publichtml/ct/logs/cron/sitecron.log 2>&1
  1. Click Add New Cron Job

Step 7: Run Installer

Navigate to https://yourdomain.com/install/ and complete the installation.


Plesk Setup

Plesk is a popular control panel for VPS and dedicated servers.

Step 1: Add Domain

  1. Log in to Plesk
  2. Go to Websites & Domains
  3. Click Add Domain
  4. Enter your domain and configure settings
  5. Enable SSL/TLS support

Step 2: Configure PHP

  1. Go to Websites & Domains > Your domain > PHP Settings
  2. Set PHP version to 8.3
  3. Configure:
  • memorylimit = 512M
  • maxexecutiontime = 600
  • uploadmaxfilesize = 500M
  • postmaxsize = 500M
  1. Click OK

Step 3: Enable PHP Functions

  1. Go to PHP Settings for your domain
  2. Find Additional directives section
  3. Add:
disablefunctions =

(Empty value removes all disabled functions)

  1. Or selectively enable by removing specific functions from the disabled list

Step 4: Install FFmpeg

Via SSH:

# Ubuntu/Debian
sudo apt install ffmpeg

CentOS

sudo yum install ffmpeg

Step 5: Set Up Cron Job

  1. Go to Websites & Domains > Your domain > Scheduled Tasks
  2. Click Add Task
  3. Schedule: Every minute ( )
  4. Command:

/usr/bin/php /home/username/web/yourdomain.com/publichtml/ct/admin/cron/sitecron.php >> /home/username/web/yourdomain.com/publichtml/ct/logs/cron/sitecron.log 2>&1
OR
php /home/username/web/yourdomain.com/publichtml/ct/admin/cron/sitecron.php >> /home/username/web/yourdomain.com/publichtml/ct/logs/cron/sitecron.log 2>&1

Step 6: Upload and Install

  1. Upload files via FTP or File Manager
  2. Set permissions
  3. Run installer at https://yourdomain.com/install/

Ubuntu + Apache (Manual Setup)

For VPS or dedicated servers without a control panel.

Step 1: Update System

sudo apt update
sudo apt upgrade -y

Step 2: Install Apache

sudo apt install apache2 -y
sudo systemctl enable apache2
sudo systemctl start apache2

Step 3: Install PHP 8.3

# Add PHP repository
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update

Install PHP and extensions

sudo apt install php8.3 php8.3-fpm php8.3-mysql php8.3-gd php8.3-curl \
    php8.3-mbstring php8.3-xml php8.3-zip php8.3-imagick php8.3-intl -y

Enable PHP-FPM with Apache

sudo a2enmod proxyfcgi setenvif
sudo a2enconf php8.3-fpm
sudo systemctl restart apache2

Step 4: Install MySQL/MariaDB

sudo apt install mariadb-server -y
sudo mysqlsecureinstallation

Create database and user

sudo mysql -u root -p

CREATE DATABASE comusthumbz CHARACTER SET utf8mb4 COLLATE utf8mb4unicodeci;
CREATE USER 'comususer'@'localhost' IDENTIFIED BY 'YourSecurePassword123!';
GRANT ALL PRIVILEGES ON comusthumbz. TO 'comususer'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 5: Install FFmpeg

sudo apt install ffmpeg -y
which ffmpeg  # Should return /usr/bin/ffmpeg

Step 6: Configure PHP

sudo nano /etc/php/8.3/fpm/php.ini

Update these settings:

memorylimit = 512M
maxexecutiontime = 600
uploadmaxfilesize = 500M
postmaxsize = 500M
maxinputvars = 10000
date.timezone = America/NewYork
; Ensure exec and related functions are NOT in disablefunctions
sudo systemctl restart php8.3-fpm

Step 7: Configure Apache Virtual Host

sudo nano /etc/apache2/sites-available/yourdomain.com.conf
<VirtualHost :80>
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com
    DocumentRoot /var/www/yourdomain.com

AllowOverride All
Require all granted
Directory>
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php/php8.3-fpm.sock|fcgi://localhost"
FilesMatch>
ErrorLog ${APACHELOGDIR}/yourdomain.com-error.log
CustomLog ${APACHELOGDIR}/yourdomain.com-access.log combined
VirtualHost>
# Enable site and required modules
sudo a2ensite yourdomain.com.conf
sudo a2enmod rewrite headers expires deflate
sudo systemctl restart apache2

Крок 8: Встановити SSL (Зашифрування гнізда)

sudo apt install certbot python3-certbot-apache -y
sudo certbot --apache -d yourdomain.com -d www.yourdomain.com

Крок 9: Завантажити ComusThumbz

# Create document root
sudo mkdir -p /var/www/yourdomain.com

Завантаження файлів (через SCP, SFTP або wget)

cd /var/www/yourdomain.com

... upload files ...

Set ownership

sudo chown -R www-data:www-data /var/www/yourdomain.com

Set permissions

sudo find /var/www/yourdomain.com -type d -exec chmod 755 {} \;
sudo find /var/www/yourdomain.com -type f -exec chmod 644 {} \;
sudo chmod -R 775 /var/www/yourdomain.com/ct/logs /var/www/yourdomain.com/ct/uploads

Step 10: Set Up Cron Job

sudo crontab -e

Add:

/usr/bin/php /home/username/web/yourdomain.com/publichtml/ct/admin/cron/sitecron.php >> /home/username/web/yourdomain.com/publichtml/ct/logs/cron/sitecron.log 2>&1
OR
php /home/username/web/yourdomain.com/publichtml/ct/admin/cron/sitecron.php >> /home/username/web/yourdomain.com/publichtml/ct/logs/cron/sitecron.log 2>&1

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

sudo apt update
sudo apt install nginx -y

Install PHP-FPM

sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt install php8.3-fpm php8.3-mysql php8.3-gd php8.3-curl \
    php8.3-mbstring php8.3-xml php8.3-zip php8.3-imagick -y

Step 2: Configure Nginx

sudo nano /etc/nginx/sites-available/yourdomain.com
server {
    listen 80;
    listen [::]:80;
    servername yourdomain.com www.yourdomain.com;
    root /var/www/yourdomain.com;
    index index.php index.html;
	
# Security headers
addheader X-Frame-Options "SAMEORIGIN" always;
addheader X-Content-Type-Options "nosniff" always;
addheader X-XSS-Protection "1; mode=block" always;

# Main location block
location / {
tryfiles $uri $uri/ /index.php?$querystring;
}

# REST API rewrite
location /ct/api/v1 {
tryfiles $uri $uri/ /ct/api/v1/index.php?$querystring;
}

# PHP processing
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgipass unix:/var/run/php/php8.3-fpm.sock;
fastcgiparam SCRIPTFILENAME $documentroot$fastcgiscriptname;
include fastcgiparams;
}

# Deny access to sensitive directories
location ~ ^/ct/(dat|logs)/ {
deny all;
return 404;
}

# Cache static files
location ~ \.(jpg|jpeg|png|gif|webp|ico|css|js|mp4|webm|m3u8|ts)$ {
expires 30d;
addheader Cache-Control "public, immutable";
}

# Deny access to hidden files
location ~ /\. {
deny all;
}
}

 

# Enable site
sudo ln -s /etc/nginx/sites-available/yourdomain.com /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx

Step 3: Configure PHP-FPM

sudo nano /etc/php/8.3/fpm/php.ini

Update settings as shown in the Apache section, then:

sudo systemctl restart php8.3-fpm

Step 4: Install SSL

sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

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

# CentOS/RHEL 8+
sudo dnf install epel-release -y
sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm -y

Enable Remi PHP 8.3

sudo dnf module reset php -y
sudo dnf module enable php:remi-8.3 -y

Step 2: Install Apache, PHP, and Extensions

sudo dnf install httpd php php-fpm php-mysqlnd php-gd php-curl \
    php-mbstring php-xml php-zip php-imagick -y
sudo systemctl enable httpd php-fpm

sudo systemctl start httpd php-fpm

Step 3: Install MariaDB

sudo dnf install mariadb-server -y
sudo systemctl enable mariadb
sudo systemctl start mariadb
sudo mysqlsecureinstallation

Step 4: Install FFmpeg

# Enable RPM Fusion
sudo dnf install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm -y
sudo dnf install ffmpeg -y

Step 5: Configure PHP

sudo nano /etc/php.ini

Update settings as described in previous sections.

sudo systemctl restart php-fpm

Step 6: Configure SELinux (if enabled)

# Allow Apache to connect to network (for API calls)
sudo setsebool -P httpdcannetworkconnect 1

Allow Apache to write to upload directories

sudo chcon -R -t httpdsysrwcontentt /var/www/yourdomain.com/ct/uploads
sudo chcon -R -t httpdsysrwcontentt /var/www/yourdomain.com/ct/logs

Step 7: Configure Firewall

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload

 

Troubleshooting Common Setup Issues

"exec() has been disabled" Error

Error:
Symptoms: Video processing fails, FFmpeg errors.

 

Solution: Enable exec() in PHP configuration. See platform-specific instructions above.

"Permission denied" Errors

Error:
Symptoms: Cannot upload files, cannot save settings.

Solution:

chown -R www-data:www-data /path/to/ct/

chmod -R 775 /path/to/ct/logs /path/to/ct/uploads

Cron Job Not Running

Error:
Symptoms: Videos stay in "pending" status.

Verify cron:

# Check cron is running

systemctl status cron

Check cron log

grep CRON /var/log/syslog

Test manually

php /path/to/ct/admin/cron/sitecron.php

500 Internal Server Error

Error:
Symptoms: Blank page or 500 error.

Solutions:

  1. Check PHP error log: tail -f /path/to/ct/logs/php-error.log
  2. Check Apache/Nginx error log
  3. Verify .htaccess is valid
  4. Check file permissions

API Returns 404

Error:
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:

location /ct/api/v1 {

    tryfiles $uri $uri/ /ct/api/v1/index.php?$querystring;

}


Логін

ДатаРедагуванняЗміни
2026-01-021.0.0 кмКерівництво налаштування сервера