.htaccess to nginx converter

http://winginx.com/en/htaccess

Advertisements

Uninstall ClamAV from CentOS (VestaCP)

If you experience High CPU usage for clamd:

yum remove clamav*

Go to /usr/local/vesta/conf/vesta.conf and change line:

ANTIVIRUS_SYSTEM='clamav-daemon'
ANTIVIRUS_SYSTEM=''

Go to /etc/exim/exim.conf and change line:

CLAMD =  no

Note: This way is not perfect. There are many log records for “clamd is down”.

Use Let’s Encrypt SSL on VestaCP 8083 Panel

Thanks to https://git.scit.ch/rs/VestaCP-SystemSSL

nano /etc/cron.daily/vesta_ssl

Please change the [USER] and [DOMAIN] part with your system domain.

#!/bin/bash

cert_src="/home/[USER]/conf/web/ssl.[DOMAIN].pem"
key_src="/home/[USER]/conf/web/ssl.[DOMAIN].key"
cert_dst="/usr/local/vesta/ssl/certificate.crt"
key_dst="/usr/local/vesta/ssl/certificate.key"

if ! cmp -s $cert_dst $cert_src
then
        # Copy Certificate
        cp $cert_src $cert_dst

        # Copy Keyfile
        cp $key_src $key_dst

        # Change Permission
        chown root:mail $cert_dst
        chown root:mail $key_dst

        # Restart Services
        service vesta restart &> /dev/null
        service exim4 restart &> /dev/null
fi

chmod +x /etc/cron.daily/vesta_ssl

How to Backup-Restore VestaCP

Create new backup (without exceptions) (Upload to another server)

v-backup-user admin

scp /home/backup/admin.2014-01-14.tar new-server:/home/backup/

Install clean CentOS

Install VestaCP

Change Timezone on VestaCP Server settings

Delete default web-dns-db on VestaCP

Restore using backup file (Download from other server)

v-restore-user admin admin.2014-01-14.tar

Change VestaCP password

Setup MySQL root Password: mysqladmin -u root password NewPass

Update the mysql password on /usr/local/vesta/conf/mysql.conf Because, it is required for backup.

Setup Login SSH without Password

Secure Apache, PHP, PhpMyAdmin, Roundcube