Tag: Web Development

  • How to Set Up an SSL Certificate for Your Website (Free & Paid)

    How to Set Up an SSL Certificate for Your Website (Free & Paid)

    How to Set Up an SSL Certificate for Your Website (Free & Paid)

    In today’s internet landscape, SSL certificates are no longer optional — they are a must-have. Whether you’re running a blog, an online store, or a business portfolio, having an SSL certificate protects your visitors’ data and builds trust in your brand.

    In this post, we’ll walk you through what SSL is, why it’s important, and step-by-step instructions on setting up both free and paid SSL certificates for your website.

    What Is an SSL Certificate?

    SSL (Secure Sockets Layer) encrypts data exchanged between your website and its visitors. It ensures sensitive information like passwords, credit card numbers, and personal details can’t be intercepted.

    When your website has SSL installed:

    • Your URL changes from http:// to https://
    • A padlock icon appears in the browser address bar
    • Your site is marked as “Secure” by search engines and browsers

    Why You Need SSL

    • Security: Protects data from hackers and eavesdroppers
    • Trust: Visitors feel safer on a secure website
    • SEO Boost: Google ranks HTTPS sites higher
    • Browser Compliance: Modern browsers flag non-SSL sites as “Not Secure”

    Free vs.  Paid SSL Certificates

    Feature Free SSL (e.g. Let’s Encrypt) Paid SSL (e.g. Sectigo, DigiCert)
    Cost Free Annual Fee ($10 – $300+)
    Validation Type Domain Validation (DV) only DV, Organization (OV), or Extended (EV)
    Warranty None or Limited Yes, up to $1 million
    Support Community or host-based Full vendor support
    Validity Period 90 days (auto-renewable) 1–2 years

     How to Install a Free SSL Certificate with Let’s Encrypt (On Linux)

    Step 1: Install Certbot

    Certbot is a free tool for installing Let’s Encrypt certificates.

    For Ubuntu/Debian:

    sudo apt update
    sudo apt install certbot python3-certbot-apache  # For Apache
    # or
    sudo apt install certbot python3-certbot-nginx   # For NGINX
    

    Step 2: Generate & Install the SSL Certificate

    For Apache:

    sudo certbot --apache
    

    For NGINX:

    sudo certbot --nginx
    

    Step 3: Auto-Renewal (Let’s Encrypt expires every 90 days)

    Add to cron:

    sudo crontab -e
    

    Add:

    0 0 * * * /usr/bin/certbot renew >> /var/log/ssl-renew.log
    

    Or test manually:

    sudo certbot renew --dry-run
    

    How to Install a Paid SSL Certificate (Manual Method)

    If you’ve purchased an SSL certificate from a provider (e.g. GoDaddy, Namecheap, DigiCert), here’s how to install it:

    Step 1: Generate a CSR (Certificate Signing Request)

    openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr
    

    Submit the .csr file to your SSL provider.

    Step 2: Receive Your Certificate Files

    You’ll typically receive:

    • yourdomain.crt (your certificate)
    • ca-bundle.crt (intermediate chain)

    Step 3: Configure Web Server

    For Apache:

    <VirtualHost *:443>
      ServerName www.yourdomain.com
      SSLEngine on
      SSLCertificateFile /etc/ssl/certs/yourdomain.crt
      SSLCertificateKeyFile /etc/ssl/private/yourdomain.key
      SSLCertificateChainFile /etc/ssl/certs/ca-bundle.crt
    </VirtualHost>
    

    For NGINX:

    server {
      listen 443 ssl;
      server_name yourdomain.com;
    
      ssl_certificate /etc/ssl/certs/yourdomain.crt;
      ssl_certificate_key /etc/ssl/private/yourdomain.key;
      ssl_trusted_certificate /etc/ssl/certs/ca-bundle.crt;
    }
    

    Restart your server:

    sudo systemctl restart apache2
    # or
    sudo systemctl restart nginx
    

    How to Verify Your SSL Installation

    Use online tools:

    • 🔗 SSL Labs Test
    • 🔗 Why No Padlock

    These tools will confirm:

    • The certificate is valid
    • The chain of trust is correct
    • There are no mixed-content issues

     SSL in cPanel (Free & Paid)

    Most shared hosting accounts (like on Vicservers) offer 1-click SSL setup from cPanel:

    Steps:

    1. Log in to cPanel
    2. Go to SSL/TLS > Manage SSL Sites
    3. Use AutoSSL for Let’s Encrypt or upload a certificate manually
    4. Save and verify HTTPS redirection

    Pro Tips from Vicservers

    • Always redirect HTTP to HTTPS
    • Back up your key and cert files
    • Use strong SSL protocols (disable TLS 1.0 & 1.1)
    • Set reminders to renew paid certificates
    • Consider HSTS headers for better security

    Conclusion

    Installing an SSL certificate — whether free or paid — is a crucial step toward securing your website, improving SEO, and building trust with your users.

    At Vicservers, we offer:

    • Free SSL with all shared hosting plans
    • One-click AutoSSL on cPanel
    • Paid SSL certificates for advanced needs
    • Professional installation for VPS and dedicated servers

    Need Help Setting Up SSL?

    We’ve got your back. Our experts will set up your SSL, redirect traffic to HTTPS, and secure your entire website — no stress.

    🌐 www.vicservers.com
    📧 [email protected]

    By Vicservers | Trusted Hosting & Web Security Solutions

  • Securing Your VPS with Fail2Ban

    Securing Your VPS with Fail2Ban

    Securing Your VPS with Fail2Ban

    When it comes to managing your own Virtual Private Server (VPS), security should be your top priority. Cyber threats like brute-force attacks, DDoS attempts, and unauthorized access happen every day — and your server might be a target without you even knowing it.

    That’s why at Vicservers, we recommend using Fail2Ban, a lightweight but powerful tool that helps automatically detect and block malicious IP addresses attempting to abuse your server.

    What is Fail2Ban?

    Fail2Ban is an open-source intrusion prevention framework that scans log files for suspicious activity (e.g., too many failed login attempts) and bans the offending IPs by updating firewall rules.

    Key Features:

    • Detects brute-force attacks on SSH, FTP, Apache, etc.
    • Automatically bans IPs for a specified period
    • Logs and tracks attacker behavior
    • Customizable filters and actions

    Why You Need Fail2Ban on Your VPS

    1. Protection from Brute-force Attacks

    Automated bots can try thousands of login combinations on SSH in minutes. Fail2Ban blocks IPs after repeated failures, reducing your risk significantly.

    2. Lightweight & Resource-Efficient

    Unlike full firewall suites, Fail2Ban uses minimal CPU and memory, perfect for small to mid-sized VPSs.

    3. Customizable Security Policies

    You can define how many failures trigger a ban, how long the ban lasts, and even notify yourself when it happens.

    How to Install Fail2Ban on Linux (Ubuntu/Debian)

    Step 1: Update Your Server

    sudo apt update && sudo apt upgrade -y
    

    Step 2: Install Fail2Ban

    sudo apt install fail2ban -y
    

    Step 3: Enable and Start the Service

    sudo systemctl enable fail2ban
    sudo systemctl start fail2ban
    

    Basic Configuration

    Fail2Ban’s default config is found in /etc/fail2ban/jail.conf. But never edit it directly. Instead, create a copy:

    sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
    

    Open the new config:

    sudo nano /etc/fail2ban/jail.local
    

    Example SSH Protection:

    [sshd]
    enabled = true
    port    = ssh
    logpath = %(sshd_log)s
    maxretry = 5
    bantime = 3600
    findtime = 600
    
    • maxretry – Number of attempts before banning
    • bantime – How long to ban in seconds (3600 = 1 hour)
    • findtime – Time window to monitor failures

    Monitoring Fail2Ban

    Check status:

    sudo fail2ban-client status
    

    Check specific jail (e.g., SSH):

    sudo fail2ban-client status sshd
    

    Unban an IP manually:

    sudo fail2ban-client set sshd unbanip 192.168.1.100
    

    Protecting More Than Just SSH

    Fail2Ban supports other services too:

    Service Jail Name Log File Example
    Apache apache-auth /var/log/apache2/error.log
    Nginx nginx-http-auth /var/log/nginx/error.log
    Postfix postfix /var/log/mail.log
    Dovecot dovecot /var/log/mail.log

    Enable them in your jail.local by uncommenting the relevant blocks.

    Email Alerts

    To receive an email when an IP is banned:

    1. Install mail utility:
    sudo apt install mailutils
    
    1. Edit jail.local:
    destemail = [email protected]
    sender = [email protected]
    action = %(action_mwl)s
    

    This will send logs and whois information about the attacker.

    Best Practices by Vicservers

    • Use SSH keys instead of passwords
    • Change the default SSH port
    • Pair Fail2Ban with UFW or iptables
    • Regularly check your logs and ban list
    • Keep Fail2Ban up to date

    Conclusion

    Fail2Ban is one of the simplest yet most effective ways to harden your Linux VPS against common attacks. In just a few minutes, you can dramatically reduce your server’s exposure to automated threats.

    At Vicservers, we deploy Fail2Ban on all managed VPS and dedicated servers by default. Whether you’re hosting a website, app, or database — security is never optional.

    Need Help?

    Let Vicservers handle your server security while you focus on growing your business.

    🌐 Visit us at www.vicservers.com
    📧 Email: [email protected]

    By Vicservers | Expert Linux Hosting & Server Security

  • Automating Backups on Linux Using rsync

    Automating Backups on Linux Using rsync

    Automating Backups on Linux Using rsync

    When managing servers or personal systems on Linux, automated backups are essential. Data loss can strike due to hardware failure, human error, or malicious attacks. That’s why one of the most efficient and reliable methods is using the rsync command.

    In this blog post, we’ll walk you through how to automate backups on a Linux system using rsync, with practical examples, cron job scheduling, and tips for best practices. Let’s help you protect your data — the Vicservers way.

    What is rsync?

    rsync (short for “remote sync”) is a command-line utility for efficiently syncing files and directories between two locations. It’s built into most Linux distributions and is widely used for both local and remote backups.

    ✅ Key Features:

    • Delta-transfer algorithm – Only copies changed parts of files.
    • Preserves metadata – Permissions, ownerships, timestamps, and symbolic links.
    • Works locally and over SSH.
    • Highly customizable with inclusion/exclusion rules.

    Basic rsync Syntax

    rsync [OPTIONS] SOURCE DESTINATION
    

    Example:

    rsync -avz /home/user/ /mnt/backup/user/
    
    • -a – Archive mode
    • -v – Verbose
    • -z – Compress file data during the transfer

    Why Automate Backups?

    Manual backups are prone to human error and inconsistency. Automating ensures:

    • Regular, on-time backups
    • Reduced downtime
    • Easier disaster recovery
    • Peace of mind!

    Automating rsync with Cron

    You can use the cron scheduler to automate your backup script. Here’s how:

    Step 1: Create a Backup Script

    Create a file, e.g., /usr/local/bin/backup.sh:

    #!/bin/bash
    
    rsync -avz --delete /home/user/ /mnt/backup/user/ >> /var/log/backup.log 2>&1
    

    Make it executable:

    chmod +x /usr/local/bin/backup.sh
    

    Step 2: Add a Cron Job

    Edit your crontab:

    crontab -e
    

    Add this line to run the backup daily at 2 AM:

    0 2 * * * /usr/local/bin/backup.sh
    

    Remote Backups Using SSH

    You can easily back up files to a remote server with rsync over SSH:

    rsync -avz -e ssh /var/www/ user@backupserver:/backups/website/
    

    Set up SSH key authentication to avoid password prompts:

    ssh-keygen -t rsa
    ssh-copy-id user@backupserver
    

    Common rsync Options

    Option Description
    --delete Deletes files in the destination not in source
    --exclude Skip specified files or directories
    --progress Shows real-time file transfer progress
    --dry-run Simulates the command without making changes
    --bwlimit=KBPS Limit bandwidth usage

    Example:

    rsync -avz --delete --exclude "*.tmp" /home/user/ /mnt/backup/
    

    Backup Best Practices (Vicservers Recommended)

    1. Use External Drives or Remote Servers – Never back up to the same disk.
    2. Encrypt Remote Backups – Use SSH or GPG encryption.
    3. Set Notifications – Alert on success/failure using mailx or a monitoring tool.
    4. Verify Restorations Regularly – A backup is only good if you can restore it.
    5. Store Backups Offsite or in the Cloud – Adds resilience against disasters.

    Conclusion

    Using rsync for automated backups on Linux is a simple yet powerful strategy. Combined with cron jobs, it becomes a “set it and forget it” solution. Whether you’re managing a personal server or business infrastructure, Vicservers recommends rsync as part of any solid disaster recovery plan.

    Need Help?

    Vicservers offers managed Linux hosting and automated backup services tailored to your business. Let our engineers set it all up for you — the secure, professional way.

    📞 Contact Us: www.vicservers.com
    📧 Email: [email protected]

    By VicServers | Secure. Scalable. Reliable.

  • How to Monitor Server Performance Using htop and top

    How to Monitor Server Performance Using htop and top

    How to Monitor Server Performance Using htop and top on Linux

    When managing servers — whether on-premise or in the cloud — monitoring performance is crucial. Knowing how your CPU, RAM, and processes behave in real-time helps you prevent crashes, detect intrusions, and optimize resource usage. Two of the most reliable command-line tools for Linux performance monitoring are top and htop.

    In this guide, Vicservers walks you through using both tools to stay in control of your Linux server’s health.

    What Are top and htop?

    • top: A built-in Linux utility that shows real-time process activity and system resource usage.
    • htop: An enhanced, interactive version of top, with a colorful, user-friendly interface. Not pre-installed on all systems, but easy to set up.

    Installing htop (If Needed)

    Ubuntu/Debian:

    sudo apt update && sudo apt install htop
    

    CentOS/RHEL:

    sudo yum install epel-release
    sudo yum install htop
    

    📈 Using top

    Just run:

    top
    

    You’ll see:

    • CPU usage per core
    • Memory and swap usage
    • A list of running processes
    • Load average (system load over 1, 5, and 15 minutes)

    Common top Keyboard Commands:

    • q: Quit
    • P: Sort by CPU usage
    • M: Sort by memory usage
    • k: Kill a process (enter PID)
    • 1: View CPU usage per core

    Use top when you want a lightweight, fast overview — especially on remote servers.

     Using htop

    Launch with:

    htop
    

    htop advantages:

    • Color-coded performance bars
    • Horizontal CPU/memory graphs
    • Scrollable list of processes
    • Easier to navigate

    Key Features:

    • Interactive UI: Use arrow keys to navigate.
    • Search: Press / to search for a process by name.
    • Kill processes: Select with arrows, press F9.
    • Sort: Use F6 to change sorting criteria.

    Real-World Use Cases at Vicservers

    • 🔄 Detecting runaway processes: Use htop to identify apps using 100% CPU.
    • 🚦 Diagnosing slowdowns: Spot memory leaks in long-running services.
    • 🧪 Testing performance: Monitor impact of new deployments on CPU and RAM.
    • 🔐 Checking for suspicious activity: Unusual processes could signal intrusion.

    Comparing top vs htop

    Feature top htop
    Pre-installed ❌ (install needed)
    UI Basic text Colorful, interactive
    Mouse Support
    Scrolling
    Easy Sorting Manual With hotkeys

    Pro Tips from Vicservers

    • 🔒 Use with sudo to see all system processes:
      sudo htop
      
    • 📸 Log system usage:
      top -b -n 1 > server_snapshot.txt
      
    • 🔁 Combine with cron jobs to automate snapshots for later analysis.

    Conclusion

    Whether you prefer the simplicity of top or the visual clarity of htop, both tools are essential for any Linux system administrator or DevOps engineer. At Vicservers, we help clients across Nigeria deploy, monitor, and secure their servers efficiently.

    Need help managing server performance at scale?
    Contact our team for tailored support and automated server monitoring solutions.

    📧 [email protected]
    🌐 www.vicservers.com

    By Vicservers – Nigeria’s Trusted Server & Infrastructure Partner

  • Setting Up Crontab for Automated Server Tasks

    Setting Up Crontab for Automated Server Tasks

    Setting Up Crontab for Automated Server Tasks: A Practical Guide by Vicservers

    At Vicservers, we help Nigerian businesses and tech teams streamline their server operations — and one of the most powerful tools in any system admin’s toolkit is Crontab. Whether you’re running a cloud server, managing backups, or automating scripts, cron jobs are the key to hands-free task scheduling in Linux.

    In this guide, we’ll walk you through how to set up Crontab for automated tasks, best practices, and real-life use cases you can implement today.

    What is Crontab?

    Crontab (short for “cron table”) is a configuration file used to schedule tasks at specified times or intervals. These tasks — known as cron jobs — can be anything from running a script to sending emails, backing up files, or restarting services.

    Cron is built into most Linux distributions, including Ubuntu, CentOS, and Debian.

    Step 1: Accessing Crontab

    To edit your user’s crontab file:

    crontab -e
    

    If it’s your first time, you’ll be asked to choose an editor (like nano or vim).


    Step 2: Understanding Crontab Syntax

    Crontab entries follow this format:

    * * * * * command_to_run
    - - - - -
    | | | | |
    | | | | +----- Day of week (0–7, Sunday=0 or 7)
    | | | +------- Month (1–12)
    | | +--------- Day of month (1–31)
    | +----------- Hour (0–23)
    +------------- Minute (0–59)
    

    Example: Run a script every day at 2 AM

    0 2 * * * /home/user/backup.sh
    

    Step 3: Common Cron Use Cases

    Here are some everyday automation examples for Nigerian developers, SMEs, and sysadmins:

    🔄 1. Automated Server Backups

    0 1 * * * /usr/local/bin/db_backup.sh
    

    Backs up the database daily at 1 AM.

    💡 2. Restart a Service Weekly

    0 3 * * 0 systemctl restart apache2
    

    Restarts Apache every Sunday at 3 AM.

    📧 3. Email System Logs Every Day

    30 5 * * * cat /var/log/syslog | mail -s "Daily Logs" [email protected]
    

    👨‍🔧 Step 4: List and Remove Cron Jobs

    • View current user’s cron jobs:
    crontab -l
    
    • Remove all cron jobs:
    crontab -r
    
    • Remove specific jobs: Edit with crontab -e and delete the line.

    Best Practices by Vicservers

    • ✏️ Use full paths to scripts and binaries (/usr/bin/php, /bin/bash, etc.).
    • 📂 Redirect output for debugging:
      0 4 * * * /home/user/script.sh >> /home/user/logs/script.log 2>&1
      
    • 🔒 Use a dedicated user for sensitive jobs.
    • 🔄 Test scripts manually before scheduling them.
    • 📡 Set up email notifications by configuring the MAILTO variable in crontab:
      MAILTO="[email protected]"
      

    Bonus: Check Cron Logs

    On most Linux servers, cron logs are stored here:

    /var/log/cron     # CentOS/RHEL
    /var/log/syslog   # Ubuntu/Debian
    

    Use this to troubleshoot failed jobs.

    Conclusion

    Crontab simplifies routine server management by automating repetitive tasks. Whether you’re a growing tech startup in Lagos or a DevOps team scaling cloud infrastructure, automation is key — and cron makes it happen.

    Need help setting up or securing cron jobs on your Linux server? Vicservers offers expert support, server automation, and managed infrastructure solutions.

    📞 Reach out to us today:
    🌐 www.vicservers.com
    📧 [email protected]

    Vicservers – Hosting That Empowers You to Take Full Control.

  • How to Add and Manage Users on a Linux Server

    How to Add and Manage Users on a Linux Server

    How to Add and Manage Users on a Linux Server: A Guide by Vicservers

    In today’s digital economy, managing user access on Linux servers is critical for ensuring security, efficiency, and scalability — especially for Nigerian businesses embracing digital transformation. At Vicservers, we specialize in providing secure, scalable, and reliable server solutions. In this blog, we walk you through the essential steps to add and manage users on a Linux server — whether you’re a system admin, DevOps engineer, or tech entrepreneur managing your own infrastructure.

    Why User Management Matters

    User management allows system administrators to:

    • Control who can access what on the server.
    • Assign proper permissions for operational safety.
    • Track usage and monitor activities.
    • Prevent unauthorized access and security breaches.

    Let’s dive into the practical steps.

    Step 1: Adding a New User

    To add a new user to your Linux server, you can use either of the following:

    🟩 Using adduser (Recommended for Simplicity)

    sudo adduser john
    

    This command will:

    • Create a new user.
    • Set up a home directory (/home/john).
    • Prompt you to set a password.

    🟨 Using useradd (For Advanced Users)

    sudo useradd -m -s /bin/bash john
    sudo passwd john
    
    • -m creates a home directory.
    • -s defines the shell.

    Step 2: Granting Admin (Sudo) Privileges

    On Ubuntu/Debian-based systems:

    sudo usermod -aG sudo john
    

    On CentOS/RHEL systems:

    sudo usermod -aG wheel john
    

    This allows the user to run admin-level commands using sudo.

    Step 3: Modifying User Information

    You may need to rename a user, change their home directory, or update their group membership:

    sudo usermod -l newname oldname       # Rename user
    sudo usermod -d /new/home username    # Change home directory
    sudo usermod -aG devops username      # Add to group
    

    Step 4: Deleting Users

    To remove a user:

    sudo deluser username         # Ubuntu/Debian
    sudo userdel username         # CentOS/Red Hat
    

    To delete the user and their home directory:

    sudo deluser --remove-home username
    sudo userdel -r username
    

    Step 5: Creating and Managing Groups

    Linux groups help organize users and define access levels.

    Create a group:

    sudo groupadd developers
    

    Add a user to a group:

    sudo usermod -aG developers john
    

    Remove a user from a group:

    sudo gpasswd -d john developers
    

    Step 6: Monitoring Users

    Track who is logged in:

    who
    

    View activity:

    w
    

    Check login history:

    last
    

    This is especially useful for auditing and compliance — important for enterprise clients and cloud infrastructure teams.

    Step 7: Locking or Disabling Accounts

    Lock a user:

    sudo passwd -l username
    

    Unlock:

    sudo passwd -u username
    

    Disable login:

    sudo usermod -s /usr/sbin/nologin username
    

    Use this for suspending access without deleting user data.

    Best Practices by Vicservers

    At Vicservers, we recommend the following for all clients managing their Linux environments:

    • 🔐 Use SSH keys instead of passwords.
    • 📅 Set account expiration for contractors:
      sudo chage -E 2025-12-31 username
      
    • 🕵️ Regularly audit users and access logs.
    • 🔄 Automate user provisioning with Ansible or bash scripts.

     Final Thoughts

    Linux user management is more than just creating accounts — it’s about maintaining a secure and organized environment. Whether you’re running cloud servers in Lagos, hosting websites for clients, or building fintech platforms, Vicservers has your back with managed services, security best practices, and professional support.

    Need help managing your Linux infrastructure or migrating to a better server platform? Contact Vicservers or visit www.vicservers.com to learn more.

     

  • Essential Linux Commands Every Server Admin Should Know

    Essential Linux Commands Every Server Admin Should Know

    Essential Linux Commands Every Server Admin Should Know

    Introduction

    Linux is the backbone of modern web servers. Whether you’re running a personal blog or managing a fleet of cloud instances, mastering Linux commands is essential for secure and efficient server administration.

    In this guide, Vicservers introduces you to the must-know Linux commands that every server administrator should have in their toolkit. From basic navigation to system monitoring, this tutorial is perfect for beginners and intermediates alike.

    1. File and Directory Navigation

    Understanding the Linux filesystem is the foundation of all server tasks.

    pwd

    Print Working Directory

    pwd
    

    Shows your current directory.

    ls

    List Contents

    ls        # List files  
    ls -l     # Long format  
    ls -a     # Include hidden files  
    

    cd

    Change Directory

    cd /etc          # Absolute path  
    cd ..            # Go up one level  
    cd ~             # Go to home directory  
    

    mkdir & rmdir

    Create and Remove Directories

    mkdir new_folder  
    rmdir old_folder  
    

     2. File Management

    Manipulating files is an everyday task for sysadmins.

    touch

    Create Empty File

    touch test.txt
    

    cp, mv, rm

    Copy, Move, and Remove Files

    cp file.txt /backup/  
    mv file.txt newname.txt  
    rm file.txt             # Use with caution!
    

    cat, less, head, tail

    View File Contents

    cat file.txt  
    less file.txt  
    head -n 10 file.txt     # First 10 lines  
    tail -f /var/log/syslog # Live log view  
    

    3. User and Permission Management

    Controlling access is critical for server security.

    adduser / useradd

    Create New User

    adduser johndoe
    

    passwd

    Change Password

    passwd johndoe
    

    usermod

    Modify User Account

    usermod -aG sudo johndoe  # Add to sudoers  
    

    chmod / chown

    Change Permissions and Ownership

    chmod 755 script.sh  
    chown user:group file.txt
    

    4. System Monitoring

    These commands help you track performance and spot issues.

    top / htop

    Live Process Monitor

    top
    

    For a friendlier interface, install htop:

    sudo apt install htop
    htop
    

    df -h

    Disk Space Usage

    df -h
    

    du -sh

    Directory Size Summary

    du -sh /var/log
    

    free -h

    Memory Usage

    free -h
    

    uptime

    System Load and Running Time

    uptime
    

     5. Network Management

    Server connectivity is everything—monitor it with these tools.

    ip a or ifconfig

    View Network Interfaces

    ip a
    

    ping

    Test Connectivity

    ping google.com
    

    netstat or ss

    List Network Connections

    ss -tuln
    

    traceroute

    Trace Packet Path

    traceroute google.com
    

    curl & wget

    Download Files or Check Web Status

    curl -I https://example.com  
    wget https://example.com/file.zip
    

    6. Package Management

    Installing and updating software is common in server maintenance.

    For Debian/Ubuntu (APT):

    sudo apt update  
    sudo apt upgrade  
    sudo apt install nginx  
    sudo apt remove apache2
    

    For CentOS/RHEL (YUM or DNF):

    sudo yum update  
    sudo yum install httpd  
    sudo dnf install nginx
    

    7. Searching and Filtering

    Find files or filter logs with precision.

    find

    Search for Files

    find / -name "config.php"
    

    grep

    Text Pattern Search

    grep "error" /var/log/syslog
    

    Use with pipes:

    cat log.txt | grep "404"
    

    locate

    Fast File Lookup

    sudo updatedb  
    locate php.ini
    

    8. Log File Management

    Monitoring logs helps you detect errors and intrusions.

    journalctl

    Systemd Log Viewer

    journalctl -xe
    

    Common Log Files:

    • /var/log/syslog – system messages
    • /var/log/auth.log – SSH and user activity
    • /var/log/apache2/ – Apache logs
    • /var/log/nginx/ – NGINX logs

    tail -f

    Watch Logs in Real Time

    tail -f /var/log/nginx/error.log
    

    9. Process and Service Management

    Start, stop, and inspect services.

    systemctl

    Manage Services on Systemd Systems

    sudo systemctl start nginx  
    sudo systemctl stop apache2  
    sudo systemctl restart mysql  
    sudo systemctl status ssh
    

    ps & kill

    List and Terminate Processes

    ps aux | grep nginx  
    kill 1234               # Kill process by PID  
    kill -9 1234            # Force kill
    

    10. SSH & Remote Management

    Connect and control servers remotely.

    ssh

    Connect to Remote Server

    ssh [email protected]
    

    scp

    Secure File Copy

    scp file.txt user@host:/path/
    

    Bonus: Time-Saving Shortcuts

    Shortcut Description
    !! Run last command again
    !n Run command number n from history
    Ctrl + R Reverse search through command history
    history Show command history
    alias Create command shortcut
    alias ll='ls -lah'
    

    Safety Tips for Admins

    • Never run random commands with sudo unless you understand them.
    • Use --dry-run options if available (e.g., rsync --dry-run)
    • Regularly back up config files before editing them.
    • Use a non-root user with sudo privileges for daily tasks.
    • Set up a firewall (ufw or firewalld) and fail2ban for security.

    Sample Workflow: Updating Your Server Securely

    # Step 1: Connect
    ssh [email protected]
    
    # Step 2: Update system
    sudo apt update && sudo apt upgrade
    
    # Step 3: Check disk space
    df -h
    
    # Step 4: Monitor live logs
    tail -f /var/log/syslog
    
    # Step 5: Reboot if needed
    sudo reboot
    

    Final Thoughts

    Mastering essential Linux commands is key to becoming a confident and competent server administrator. While graphical tools like cPanel and WHM simplify hosting, the command line offers unmatched flexibility and power.

    Whether you’re running a single VPS or managing multiple client accounts on a reseller server, these Linux commands will serve you well.

    Want to Go Deeper?

    Vicservers provides fully managed VPS, dedicated servers, and reseller hosting with root access—perfect for learning and applying Linux skills in real time.

    ✅ 24/7 support
    ✅ Free migration
    ✅ Root access + WHM
    ✅ Secure, SSD-powered infrastructure

    🔗 Explore Hosting Plans

    Vicservers – Hosting That Empowers You to Take Full Control.

     

  • WHM Tutorial: Creating and Managing Hosting Packages

    WHM Tutorial: Creating and Managing Hosting Packages

    WHM Tutorial: Creating and Managing Hosting Packages

    Introduction

    If you manage multiple websites or operate as a web hosting reseller, Web Host Manager (WHM) is your control tower. One of WHM’s most powerful features is the ability to create custom hosting packages, allowing you to define limits and resources for each cPanel account you host.

    Whether you’re building a hosting business or managing a VPS with multiple sites, understanding how to create and manage hosting packages in WHM is essential.

    In this Vicservers guide, you’ll learn:

    • What hosting packages are
    • Why use them
    • How to create, edit, and assign packages in WHM
    • Tips for efficient package management
    • Common errors and troubleshooting

    Let’s get started.

    What Is WHM?

    Web Host Manager (WHM) is a powerful admin interface that allows server owners and resellers to manage multiple cPanel accounts. Unlike cPanel (which manages one website), WHM lets you:

    • Create and manage hosting accounts
    • Monitor server performance
    • Install SSL certificates
    • Manage DNS zones
    • Customize packages and more

    With Vicservers’ reseller and VPS plans, WHM is included to help you take full control of your hosting environment.

    What Are Hosting Packages?

    A hosting package is a predefined set of limits and features you assign to cPanel accounts. This helps ensure consistent performance and resource allocation.

    Typical hosting package settings include:

    • Disk space
    • Bandwidth
    • Email accounts
    • FTP accounts
    • MySQL databases
    • Addon domains
    • cPanel features (SSL, backups, etc.)

    Why Use Hosting Packages?

    • Efficiency: Quickly assign pre-configured settings
    • Consistency: Maintain quality of service
    • Customization: Offer tiered plans (Basic, Pro, Business)
    • Control: Prevent overuse of resources

    How to Create a Hosting Package in WHM

    Let’s create your first hosting plan.

    Step 1: Log in to WHM

    • Visit: https://your-server-ip:2087
    • Enter your root or reseller credentials

     Step 2: Navigate to “Add a Package”

    In the left sidebar or via search:

    Go to Packages > Add a Package

     Step 3: Fill in Package Details

    Here’s what you’ll see:

    • Package Name: Choose a name like Starter, Business, or Unlimited
    • Disk Quota (MB): Amount of disk space (e.g., 1000 for 1 GB)
    • Monthly Bandwidth (MB): e.g., 10,000 for 10 GB
    • Max FTP Accounts: Number of FTP users
    • Max Email Accounts: Number of email inboxes allowed
    • Max Email Lists: Leave default or set to 0
    • Max Databases: MySQL databases allowed
    • Max Sub Domains / Parked Domains / Addon Domains

    You can also choose:

    • Max Hourly Email by Domain Relayed: Prevents spamming
    • Max Percentage of Failed/Deferred Messages: Spam control

    Step 4: Select Feature List

    Feature lists define what tools are available in cPanel for that package:

    • Autoresponders
    • File Manager
    • Git Version Control
    • SSL/TLS Manager
    • Softaculous (one-click installs)

    Choose a predefined list or create one (we’ll cover this later).

    ✅ Step 5: Save the Package

    Click Add.

    Your hosting package is now available and ready to assign to cPanel accounts.

     Editing or Deleting a Package

    🧾 To Edit:

    1. Go to Packages > Edit a Package
    2. Select the package
    3. Modify values as needed
    4. Click Save Changes

    🗑️ To Delete:

    1. Go to Packages > Delete a Package
    2. Check the box beside the package
    3. Click Delete

    Note: You can’t delete a package that’s assigned to active accounts.

    Creating a New cPanel Account with a Package

    Now that you have a package, let’s assign it.

    Step 1: Go to “Create a New Account”

    • WHM > Account Functions > Create a New Account

    Step 2: Fill in Details

    • Domain: exampledomain.com
    • Username: auto-generated or custom
    • Password & Email: Secure credentials
    • Choose a Package: Select from your list

    Click Create and cPanel is ready!

    Modifying Account Packages

    If you want to upgrade/downgrade a user’s hosting resources:

    1. Go to Modify an Account
    2. Select the user
    3. Click Change Package
    4. Choose a new package
    5. Click Upgrade/Downgrade

    All resource limits and features will update accordingly.

    Creating Feature Lists (Optional but Powerful)

    Feature lists give you granular control over what cPanel users can access.

    Step 1: Go to “Feature Manager”

    • WHM > Packages > Feature Manager

    Step 2: Create a New List

    • Name your list: starter, advanced, developer
    • Click Add Feature List

    Step 3: Select Features

    • Enable/disable tools like:
      • File Manager
      • MySQL Databases
      • Cron Jobs
      • SSH Access
      • Git, Terminal, etc.

    Click Save and assign this list when creating/editing packages.

    Tips for Hosting Package Management

    ✅ Use Descriptive Names

    Make it easy to identify packages, e.g.,:

    • Basic_1GB
    • Pro_5GB
    • Unlimited_Plan

    ✅ Set Realistic Limits

    Avoid overloading your server. Don’t promise “unlimited” unless your infrastructure supports it.

    ✅ Create Tiers

    Offer 3–4 tiers for flexibility: Starter, Business, Developer, Enterprise.

    ✅ Use AutoSSL

    Make sure all packages enable SSL for security. Let’s Encrypt should be default.

    ✅ Monitor Usage

    Use WHM > Account Information > List Accounts to monitor disk/bandwidth usage and upgrade accounts as needed.

    Common Issues & Troubleshooting

    Problem Solution
    Can’t create package Check for missing permissions
    New user exceeds limits Modify package or assign new one
    Deleted package still in use Unassign from accounts first
    Features not appearing in cPanel Check Feature List assignment

    Security Tip: Restrict Critical Features

    For entry-level hosting plans, consider disabling:

    • SSH Access
    • Cron Jobs
    • Terminal
    • API Tokens

    These are useful for advanced users but risky for beginners.

    Use Case: Reseller Hosting with WHM

    If you’re a Vicservers reseller:

    • Each client gets a unique cPanel account
    • Hosting packages define how much space and features each gets
    • You can brand WHM/cPanel with your logo and name
    • WHMCS can be integrated for billing and automation

    Advanced Options (Optional)

    Custom Quotas via API

    Use WHM’s API to dynamically assign custom plans.

    Upgrade Plans with Softaculous

    Offer auto-installed CMS (like WordPress) in higher-tier packages.

    Combine with CloudLinux

    Limit resource usage per user (CPU, RAM, I/O) for better stability.

    Final Thoughts

    Mastering hosting packages in WHM gives you total control over your server’s performance, user experience, and business scalability. Whether you’re hosting your own projects or selling hosting to others, packages make management clean and consistent.

    With Vicservers, WHM is included in every reseller and VPS plan, giving you the freedom to structure hosting the way you want—with full control and 24/7 support.

    ✅ Ready to Start?

    🚀 Visit www.vicservers.com and explore our WHM-powered hosting solutions.
    From custom packages to automatic backups and free SSL—Vicservers helps you host smarter.

    Need help? Our support team is just a chat away.

    Vicservers – Powering Resellers, Developers, and Hosting Entrepreneurs.

     

  • How to Back Up and Restore Your Website Using cPanel

    How to Back Up and Restore Your Website Using cPanel

    How to Back Up and Restore Your Website Using cPanel

    Introduction

    Your website is your digital storefront—and like any important asset, it needs regular backups. Whether you’re a blogger, business owner, or developer, backing up your website ensures that your data is safe from threats like:

    • Server crashes
    • Hacking attempts
    • Software updates gone wrong
    • Accidental deletions

    If you’re using cPanel, you’re in luck. cPanel offers built-in tools that make backing up and restoring websites simple and efficient.

    In this guide from Vicservers, we’ll walk you through:

    • Why backups are important
    • Different types of backups
    • How to back up your website via cPanel
    • How to restore it when needed
    • Pro tips to automate and secure your backups

    Let’s get started.

    Why Backups Matter

    Imagine spending months building a website—then losing it all due to a server error or malicious attack. Without a backup, you’re left starting from scratch.

    Backups serve as your safety net. They allow you to:

    • Recover lost or corrupted files
    • Undo faulty updates or changes
    • Protect against malware or ransomware
    • Migrate to a new host or server easily

    If your business depends on your website, daily or weekly backups should be a core part of your strategy.

    Types of Backups in cPanel

    Before diving into the process, let’s review the types of backups available.

    1. Full Backup

    A complete snapshot of your entire cPanel account, including:

    • Files
    • Databases
    • Email accounts
    • DNS settings

    Ideal for:

    • Moving to another hosting provider
    • Major changes to your site or server

    Note: You can’t restore full backups from within cPanel (you’ll need your host to do it—Vicservers can help).

    2. Partial Backup

    Includes specific areas:

    • Home directory (site files)
    • MySQL databases
    • Email forwarders and filters

    Ideal for:

    • Quick restorations
    • Saving only what you need
    • Smaller, regular backups

    How to Back Up Your Website Using cPanel

    Let’s break it down step-by-step.

     Step 1: Log into cPanel

    Visit:

    yourdomain.com/cpanel
    

    Enter your credentials provided by Vicservers.

    Step 2: Locate the Backup Tool

    In the FILES section, click on:

    🔄 Backup or Backup Wizard

    We’ll explain both.

    Option 1: Using Backup Wizard (Recommended for Beginners)

    1. Click Backup Wizard
    2. Click Backup
    3. Choose:
      • Full Backup
      • Partial Backup (Home Directory, MySQL Databases, Email)
    4. For Full Backup:
      • Choose Backup Destination: Home Directory or Remote FTP
      • Enter email address for completion notification
      • Click Generate Backup
    5. Wait for the process to complete (can take minutes to hours)

    Option 2: Manual Backup via “Backup”

    1. Click Backup
    2. Under Full Backup, click Download a Full Website Backup
    3. Choose Backup Destination (usually “Home Directory”)
    4. Start the backup
    5. Download the backup file once it’s ready (usually named like backup-6.24.2025.tar.gz)

    For partial backups, download:

    • Home Directory
    • MySQL Databases (each DB separately)
    • Email Forwarders & Filters

    Downloading and Storing Your Backup

    Once generated, your backup will appear in your home directory or be available for direct download. It’s a good idea to:

    • Download it to your local machine
    • Upload to a cloud drive (Google Drive, Dropbox)
    • Store on an external hard drive

    Never rely solely on server backups—store multiple copies in different locations.

    How to Restore a Website Using cPanel

    Accidents happen. Here’s how to get your site back online fast.

    Step 1: Log into cPanel

    Use your domain login:

    yourdomain.com/cpanel
    

    Step 2: Open Backup or Backup Wizard

    Choose one:

    • Backup Wizard: Easy 3-step process
    • Backup: More flexible

    Step 3: Choose What to Restore

    With Backup Wizard:

    • Click Restore
    • Choose what you want to restore:
      • Home Directory
      • MySQL Database
      • Email Forwarders/Filters
    • Upload the respective .gz or .sql backup file

    With Backup:

    • Scroll to “Restore a Home Directory Backup”
    • Choose the backup file from your device
    • Repeat the same for MySQL or Email backups if needed

    Important Notes:

    • Full backups cannot be restored via cPanel. Contact Vicservers support to restore a full backup.
    • For database restores, ensure your database user has the correct permissions.
    • Always verify that the restoration was successful by visiting your website.

    Pro Tips for Effective Backup Management

    ✅ Schedule Regular Backups

    You can automate backups using cron jobs or third-party tools like:

    • JetBackup (if available in cPanel)
    • Acronis
    • BackupBuddy (WordPress)

    If you’re using WordPress, plugins like UpdraftPlus and Duplicator make backups seamless.

    ✅ Keep Multiple Versions

    Never overwrite your previous backup. Keep at least:

    • One recent backup (1–3 days old)
    • One weekly backup
    • One monthly backup

    ✅ Use Offsite Storage

    Store your backups in different places to avoid total loss:

    • External drive
    • Cloud storage
    • Remote FTP server

    Vicservers Tip: Use Amazon S3 or Google Drive for automated offsite backups.

    ✅ Test Your Backups

    A backup is only as good as its ability to restore. Periodically:

    • Download and extract your backup
    • Restore it on a staging site
    • Verify database and file integrity

    Common Backup & Restore Errors (and Fixes)

    Issue Cause Fix
    Backup file is too large Exceeds hosting limit Download in parts; upgrade plan
    Restore fails at 50% Corrupted archive Re-download or re-create backup
    DB restore shows errors Incompatible or damaged SQL file Check MySQL version or format
    Can’t restore full backup cPanel limitation Contact Vicservers support

    Why Choose Vicservers for Secure Backups?

    At Vicservers, we take your data seriously. Our hosting plans include:

    • Automated weekly backups
    • Full and incremental options
    • Free restoration support
    • cPanel with Backup Wizard
    • 24/7 technical assistance

    We even offer remote backup storage plans to keep your data secure offsite.

    Final Thoughts

    Website backups are not optional—they’re essential. Whether you’re a business owner or a developer, taking control of your site’s data protection is a smart investment in stability and peace of mind.

    With cPanel and Vicservers, backing up and restoring your website is as easy as a few clicks.

    ✅ Next Steps

    Want to ensure your site is always protected?

    👉 Visit www.vicservers.com to choose a hosting plan with built-in backup tools and expert support.

    Need help setting up automated backups?
    Contact our team—we’ll walk you through it.

    Vicservers – Powering Secure and Reliable Web Hosting for You

     

  • Setting Up Addon and Subdomains in cPanel

    Setting Up Addon and Subdomains in cPanel

    Setting Up Addon and Subdomains in cPanel

    Introduction

    When managing multiple websites or sections of a website, understanding Addon domains and Subdomains in cPanel is essential. These tools empower users to host multiple sites, organize content, and structure URLs—all from a single hosting account.

    In this guide, you’ll learn:

    • What addon and subdomains are
    • When to use each
    • How to set them up in cPanel
    • DNS considerations
    • Tips for managing multiple domains and subdomains effectively

    By the end, you’ll be ready to organize and expand your web presence efficiently with Vicservers hosting.

     What’s the Difference?

    Addon Domain:

    An addon domain allows you to host a completely separate website on your hosting account, using its own domain name.

    • Example: You own yourmainwebsite.com, and you want to host anotherbusiness.com on the same cPanel.

    Each addon domain has:

    • Its own root directory
    • Independent content
    • A separate domain name

    It’s like having multiple websites under one roof.

    Subdomain:

    A subdomain is a prefix added to your main domain, used to separate content or create microsites.

    • Example: blog.yourmainwebsite.com or shop.yourmainwebsite.com

    Each subdomain can have:

    • A unique root folder
    • Different content
    • A specific purpose (e.g., forums, support portals, stores)

    Subdomains are great for organizing large sites or creating feature-specific areas.

    Prerequisites

    Before setting anything up, make sure you have:

    • A hosting account with cPanel access (Vicservers provides this on shared/VPS/dedicated plans)
    • Your primary domain already set up
    • DNS access to your domain registrar if using external domains

    Setting Up an Addon Domain in cPanel

    Step 1: Log into cPanel

    Access your control panel:

    http://yourdomain.com/cpanel
    

    Login using your credentials provided by Vicservers.

    Step 2: Navigate to “Domains” or “Addon Domains”

    Under the DOMAINS section, click “Domains” (older versions may show “Addon Domains”).

    Step 3: Add New Domain

    Click the “Create A New Domain” button.

    Fill in the following:

    • Domain: Enter the full domain (e.g., anotherbusiness.com)
    • Document Root: Auto-filled (can be changed to your preferred folder)
    • Subdomain: Auto-generated; safe to keep as-is unless you need something specific

    Click Submit or Add Domain.

    Step 4: Update DNS

    To make the new addon domain live:

    • Go to your domain registrar (e.g., GoDaddy, Namecheap)
    • Point the domain’s nameservers to VicServers (usually something like ns1.vicservers.com, ns2.vicservers.com)
    • Or, update the A record to your hosting server IP

    DNS changes can take up to 48 hours to propagate.


    Step 5: Upload Your Website

    Use File Manager or FTP to upload your site files into the addon domain’s root directory (e.g., /public_html/anotherbusiness.com/).

    You can also install WordPress or other CMS tools using Softaculous in cPanel.

    Setting Up a Subdomain in cPanel

    Step 1: Go to “Subdomains”

    Under the DOMAINS section, click on “Subdomains.”

    Step 2: Create a Subdomain

    Fill out the form:

    • Subdomain: Choose a prefix (e.g., blog)
    • Domain: Select the main domain (e.g., yourmainwebsite.com)
    • Document Root: Auto-filled or customized (e.g., /public_html/blog)

    Click “Create.”

    Now your subdomain (blog.yourmainwebsite.com) is active and points to its root folder.

    Step 3: Upload or Install Content

    Just like addon domains, upload files to the subdomain directory, or use Softaculous to install WordPress or other platforms.

     DNS Settings for Addon/Subdomains

    • Addon domains require nameservers or A-record configuration at the registrar level.
    • Subdomains typically don’t require additional configuration if the main domain is already pointing to your server.
    • You can manage DNS using Zone Editor in cPanel to:
      • Add A records
      • Configure CNAMEs
      • Set up MX records for email

    If you’re hosting everything with Vicservers, DNS is often auto-configured for you.

    Securing Addon/Subdomains with SSL

    All sites deserve encryption. Let’s Encrypt or AutoSSL in cPanel makes it simple:

    Steps:

    1. Navigate to SSL/TLS Status
    2. Click “Run AutoSSL”
    3. Wait for the certificate to install

    Subdomains and addon domains should receive SSL if DNS is properly pointed to your server.

    Managing Multiple Sites Efficiently

    If you’re hosting multiple sites with addon domains or subdomains:

    • Use subdirectories to keep organized (/public_html/site1, /public_html/blog)
    • Set strong FTP account restrictions if giving others access
    • Use file naming conventions for clarity
    • Install CMSs in their own folders (e.g., WordPress in /blog)

    Common Errors & Troubleshooting

    Addon domain not showing website

    • Check if DNS is fully propagated
    • Ensure website files are in the correct document root

    Subdomain showing 404

    • Ensure content is uploaded to the right folder
    • Check if an index.html or index.php exists

    SSL not working

    • Run AutoSSL again
    • Clear browser cache
    • Wait for DNS to propagate

    When to Use Addon vs Subdomains

    Use Case Addon Domain Subdomain
    Hosting multiple businesses ✅ Yes 🚫 Not Ideal
    Organizing blog, shop, forums 🚫 No ✅ Perfect
    SEO value as separate site ✅ Good ❌ May inherit parent
    Same branding 🚫 Different domain ✅ Sub-branding
    Resource isolation ✅ More flexible ❌ Shared server limits

    Developer Tips

    • Subdomains are treated as separate entities by Google, but may still be associated with your main domain depending on linking structure.
    • Avoid nesting too deeply: e.g., blog.store.yoursite.com can get confusing.
    • Use version control tools like Git to manage projects across subdomains/addon folders.

    cPanel Tools to Support You

    Vicservers’ cPanel includes useful tools to help you manage multiple sites:

    • Redirects – Easily redirect subdomains to new URLs
    • Email Accounts – Create separate inboxes for each addon domain
    • Zone Editor – Manage advanced DNS entries
    • Softaculous – One-click installs for blogs, CMS, ecommerce

    All managed within one interface.

    Final Thoughts

    Whether you’re branching out into new businesses or just organizing your existing content, using Addon Domains and Subdomains in cPanel gives you the flexibility to expand without added cost or technical complexity.

    And with Vicservers’ fast, secure hosting and 24/7 support, you can focus on growth—while we handle the infrastructure.

    Next Steps with Vicservers

    👉 Ready to launch your next domain or project?
    Visit www.vicservers.com and choose a hosting plan that supports multiple domains.

    ✅ Unlimited Addon Domains
    ✅ Free SSL for Every Site
    ✅ cPanel + One-Click Installs
    ✅ DNS Management and Expert Support

    Vicservers — Powering Web Creators, One Domain at a Time.