cPanel/WHM Sunucu Yönetimi ve Güvenlik Rehberi

z

zafer ak

Yazar

28 December 2025 3 dakika okuma 258 görüntülenme
cPanel/WHM Sunucu Yönetimi ve Güvenlik Rehberi
cPanel/WHM hosting yönetimi. Account oluşturma, güvenlik ayarları, yedekleme yapılandırması, email yönetimi ve performans optimizasyonu.

cPanel/WHM, web hosting sunucularının yönetimi için en popüler kontrol panelidir. Bu rehberde temel yönetim ve güvenlik ayarlarını öğreneceksiniz.

Server Management cPanel

WHM İlk Kurulum

Temel Yapılandırma

  1. Initial Setup Wizard'ı tamamlayın
  2. Nameserver yapılandırması
  3. Mail exchanger ayarları
  4. FTP yapılandırması
  5. Güvenlik ayarları
# WHM erişimi
https://server-ip:2087

# cPanel erişimi
https://server-ip:2083

# SSH ile root erişimi
ssh root@server-ip

Account Yönetimi

# WHM > Account Functions > Create a New Account

# CLI ile account oluşturma
/scripts/wwwacct domain.com username password 1000 standard n n n 0

# Account listesi
/scripts/listaccts

# Account silme
/scripts/killacct username

# Account suspend
/scripts/suspendacct username
Hosting Control Panel

Güvenlik Yapılandırması

CSF Firewall

# CSF kurulumu
cd /usr/src
wget https://download.configserver.com/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh

# Yapılandırma
vi /etc/csf/csf.conf

TESTING = "0"
TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,2077,2078,2082,2083,2086,2087,2095,2096"

# CSF yeniden başlat
csf -r

ModSecurity

# WHM > Security Center > ModSecurity Vendors

# OWASP Core Rule Set etkinleştir
# Comodo WAF Rules

# Özel kurallar
# /etc/apache2/conf.d/modsec/modsec2.user.conf

# False positive için whitelist
SecRule REQUEST_URI "@contains /api/webhook" "id:1234,phase:1,nolog,allow"

Brute Force Protection

# WHM > Security Center > cPHulk Brute Force Protection

# Etkinleştir
# Failed login limits ayarla
# IP whitelist ekle

# Blocked IP'leri görüntüle
/scripts/cphulkdwhitelist query

Yedekleme Yapılandırması

# WHM > Backup > Backup Configuration

# Önerilen ayarlar:
- Backup Status: Enable
- Backup Type: Compressed
- Retain backups: 5 daily, 4 weekly, 2 monthly
- Backup accounts: Yes
- Backup system files: Yes

# Remote backup hedefi
- Amazon S3
- SFTP/FTP
- Google Drive
- Custom destination
Backup Configuration

Email Yönetimi

# WHM > Email

# SpamAssassin yapılandırma
WHM > Service Configuration > Exim Configuration Manager
- Enable SpamAssassin
- Required score: 5.0

# DKIM/SPF
WHM > Email > Email Deliverability

# Mail queue yönetimi
exim -bp | head -20    # Queue görüntüle
exim -Mrm message_id   # Mesaj sil
exim -qf               # Queue flush

PHP Yapılandırması

# WHM > Software > MultiPHP Manager

# PHP versiyonları yönet
# Account bazlı PHP seçimi

# MultiPHP INI Editor
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300
memory_limit = 512M

# OPcache ayarları
opcache.enable = 1
opcache.memory_consumption = 256
opcache.max_accelerated_files = 20000

Performans Optimizasyonu

# Apache/LiteSpeed tuning
WHM > Service Configuration > Apache Configuration

# mod_pagespeed etkinleştir
# HTTP/2 etkinleştir

# MySQL tuning
WHM > SQL Services > MySQL/MariaDB Configuration

# CloudLinux (varsa)
WHM > CloudLinux > LVE Manager
- CPU limit
- Memory limit
- I/O limit

SSL/TLS Yönetimi

# AutoSSL etkinleştir
WHM > SSL/TLS > Manage AutoSSL

# Provider: cPanel (varsayılan)
# veya Let's Encrypt

# AutoSSL çalıştır
/usr/local/cpanel/bin/autossl_check --force

# Sertifika durumu kontrol
WHM > SSL/TLS Status

Sonuç

cPanel/WHM, güçlü bir hosting yönetim platformudur. Güvenlik, yedekleme ve performans ayarlarını doğru yapılandırarak güvenilir bir hosting ortamı oluşturabilirsiniz.

İlgili Yazılar