ComusThumbz Documentation
Admin Login

Gemeenschappelijke serverinstellingen

Overzicht

Deze handleiding omvat stap-voor-stap serverconfiguratie voor de meest voorkomende hostingomgevingen die worden gebruikt met ComusThumbz. Elke sectie biedt volledige installatie-instructies, waaronder PHP configuratie, webserver setup, en ComusThumbz-specifieke eisen.

Configuratie vereist:
Alvorens verder te gaan, zorg ervoor dat uw server voldoet aan de minimumeisen die in de Vereistengids.

Ondersteunde omgevingen

MilieuComplexiteitBeste voorPHP-configuratietoegang
HestiaCPRustig.VPS, dedicated serversVolledige toegang
cPanel/WHMRustig.Gedeelde, VPS-hostingBeperkt tot MultiPHP
PleskRustig.VPS, dedicated serversVolledige toegang
Ubuntu + ApacheMiddelVPS, cloudserversVolledige toegang
Ubuntu + NginxMiddelVPS, cloudserversVolledige toegang
CentOS/AlmaLinuxMiddelOnderneming, gewijd aanVolledige toegang
DockerGeavanceerdOntwikkeling, schaalbaarVolledige controle
WolkenRustig.Beheerde cloudPaneeltoegang

HestiaCP instellen

HestiaCP is een populair gratis bedieningspaneel voor VPS-servers. Deze setup gids dekt een complete ComusThumbz installatie.

Vereisten

  • Ubuntu 20.04/22.04 of Debian 10/11
  • HestiaCP geïnstalleerd
  • Domein wees naar server
  • Toegang tot SSH

Stap 1: Webdomein aanmaken

  1. Log in bij HestiaCP op https://your-server-ip:8083
  2. Ga naar WEB tab
  3. Klik Webdomein toevoegen
  4. Voer uw domeinnaam in
  5. Inschakelen SSL-ondersteuning en controleren Laten we versleutelen
  6. Klik Opslaan

[Screenshot: hestiacp-add-domein]

Stap 2: PHP instellen

  1. Ga naar WEB tab
  2. Klik op het sleutelpictogram naast uw domein
  3. Selecteren PHP 8.3 van de PHP versie dropdown
  4. Klik Opslaan

Stap 3: Schakel vereiste PHP-functies in

Waarschuwing:
HestiaCP schakelt standaard veel PHP-functies uit. U MOET ze inschakelen voor ComusThumbz om te werken.

Optie A: Via HestiaCP Paneel

  1. Ga naar SERVEER > Instellen > PHP-FPM
  2. Zoek uw PHP-versie (bijv. PHP 8.3)
  3. Zoeken disablefunctions in de configuratie
  4. Verwijder deze functies uit de lijst met gehandicapten:

exec

  • shellexec
  • passthru
  • procopen
  • popen
  1. Klik Opslaan
  2. PHP herstarten: In SSH, uitvoeren systemctl restart php8.3-fpm

Optie B: Via SSH (aanbevolen)

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

Zoeken uitschakelenfunctielijn (rond lijn 314)

Wijziging UIT:

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

Aanpassen (exec, pasthru, shell verwijderenexec, procopen, open):

disablefunctions = system,...

PHP-FPM opslaan en herstarten

sudo systemctl restart php8.3-fpm

Stap 4: PHP-instellingen aanpassen

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

Update deze instellingen:

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

Opslaan en opnieuw starten

sudo systemctl restart php8.3-fpm

Stap 5: Installeer FFmpeg

sudo apt update
sudo apt install ffmpeg

Installatie controleren

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

Stap 6: ImageMagick installeren (facultatief)

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

Stap 7: ComusThumbz-bestanden uploaden

Via bestandsbeheer:

In HestiaCP, ga naar BESTANDEN

  1. Navigeren naar /home/username/web/yourdomain.com/publichtml/
  2. Uploaden en extraheren ComusThumbz bestanden

Via SFTP:

# Connect with SFTP client (FileZilla, WinSCP)

Host: je-server-ip
Gebruikersnaam: uw HestiaCP-gebruiker
Wachtwoord: uw HestiaCP wachtwoord
Upload to: /home/username/web/yourdomain.com/public_html/

Stap 8: Toestemmingen instellen

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

Eigenschap instellen

chown -R username:username ct/

Basisrechten instellen

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

Upload/log mappen beschrijfbaar maken

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

Stap 9: Cron Job instellen

  1. SSH naar uw server
  2. Uitvoeren: crontab -e
  3. Deze regel toevoegen:
/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

Stap 10: Installer uitvoeren

  1. Navigeren naar https://yourdomain.com/install/
  2. Volg de installatie-assistent
  3. Verwijderen /install/ map na voltooiing
Succes:
Uw HestiaCP-server is nu geconfigureerd voor ComusThumbz!

cPanel/WHM instellen

cPanel is de meest voorkomende gedeelde hosting control panel. Deze gids dekt setup voor zowel gedeelde als VPS hosting met cPanel.

Vereisten

  • cPanel-hostingaccount
  • PHP 8.0+ beschikbaar
  • SSH toegang (facultatief maar aanbevolen)

Stap 1: Selecteer PHP-versie

  1. Aanmelden bij cPanel
  2. Ga naar Software > MultiPHP-beheer
  3. Selecteer uw domein
  4. Kies PHP 8.3 (of hoogst beschikbare 8.x)
  5. Klik Toepassen

[Screenshot: cpanel-php-versie]

Stap 2: PHP-instellingen instellen

  1. Ga naar Software > MultiPHP INI Editor
  2. Selecteren Editormodus
  3. Kies uw domein
  4. Update deze instellingen:
  • memorylimit = 512M
  • maxexecutiontime = 600
  • uploadmaxfilesize = 500M
  • postmaxsize = 500M
  • maxinputvars = 10000
  1. Klik Opslaan

Stap 3: PHP-functies inschakelen

Waarschuwing:
Bij gedeelde hosting heeft u mogelijk geen toegang tot uitgeschakelde functies. Neem contact op met uw host als deze functies uitgeschakeld zijn.

Als u WHM toegang heeft:

  1. Aanmelden bij WHM
  2. Ga naar Dienstconfiguratie > PHP configuratie-editor
  3. Zoeken disablefunctions
  4. Verwijderen: exec, shellexec, passthru, procopen, popen
  5. PHP opslaan en herbouwen

Op gedeelde hosting:
Neem contact op met uw hosting provider om deze functies voor uw account.

Stap 4: Bestanden uploaden

Ga naar Bestanden > Bestandsbeheer

  1. Navigeren naar publichtml/
  2. Klik Uploaden
  3. Uploaden en extraheren ComusThumbz bestanden

Of gebruik FTP:

  • Host: yourdomain.com of ftp.yourdomain.com
  • Gebruikersnaam: uw cPanel gebruikersnaam
  • Wachtwoord: uw cPanel-wachtwoord

Stap 5: Database instellen

  1. Ga naar Databanken > MySQL databases
  2. Een nieuwe database aanmaken (bijv. usernamecomus)
  3. Een nieuwe gebruiker aanmaken met een sterk wachtwoord
  4. Gebruiker toevoegen aan database met ALLE VOORRECHTEN

Stap 6: Cron Job instellen

Ga naar Geavanceerd > Cron Jobs

  1. Schema instellen: (elke minuut)
  2. Commando:
/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. Klik Nieuwe Cron-taak toevoegen

Stap 7: Installer uitvoeren

Navigeren naar https://yourdomain.com/install/ en maak de installatie af.


Plesk-instellingen

Plesk is een populair bedieningspaneel voor VPS en dedicated servers.

Stap 1: Domein toevoegen

  1. Aanmelden bij Plesk
  2. Ga naar Websites en domeinen
  3. Klik Domein toevoegen
  4. Voer uw domein in en configureer instellingen
  5. Inschakelen SSL/TLS-ondersteuning

Stap 2: PHP instellen

  1. Ga naar Websites en domeinen > Uw domein > PHP-instellingen
  2. Instellen PHP versie tot en met 8.3
  3. Instellen:
  • memorylimit = 512M
  • maxexecutiontime = 600
  • uploadmaxfilesize = 500M
  • postmaxsize = 500M
  1. Klik OK

Stap 3: PHP-functies inschakelen

  1. Ga naar PHP-instellingen voor uw domein
  2. Zoeken Aanvullende richtlijnen sectie
  3. Toevoegen:
disablefunctions =

(Leegwaarde verwijdert alle uitgeschakelde functies)

  1. Of selectief inschakelen door specifieke functies uit de lijst met gehandicapten te verwijderen

Stap 4: Installeer FFmpeg

Via SSH:

# Ubuntu/Debian
sudo apt install ffmpeg

CentOS

sudo yum install ffmpeg

Stap 5: Cron Job instellen

  1. Ga naar Websites en domeinen > Uw domein > Geplande taken
  2. Klik Taak toevoegen
  3. Schema: Elke minuut ( )
  4. Commando:

/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

Stap 6: Uploaden en installeren

  1. Bestanden uploaden via FTP of File Manager
  2. Rechten instellen
  3. installer uitvoeren op https://yourdomain.com/install/

Ubuntu + Apache (Handmatig instellen)

Voor VPS of dedicated servers zonder bedieningspaneel.

Stap 1: Systeem bijwerken

sudo apt update
sudo apt upgrade -y

Stap 2: Installeer Apache

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

Stap 3: Installeer 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
<Directory /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

Step 8: Install SSL (Let's Encrypt)

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

Step 9: Upload ComusThumbz

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

Upload files (via SCP, SFTP, or 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;

}


Changelog

Date Version Changes
2026-01-02 1.0.0 Initial server setups guide