Why I get access not allowed after changing password on PHPmyAdmin?

Standard

Sometimes when you change password for a account, it will say that mySQL pasword was changed (but it is either left the old one or added wrong one) so when you login to cPanel and start PhpMyAdmin you will get access not allowed error.

Workaround:
go to section MYSQL in whm and change passwords for users in that database once again. :)

Install mod_rpaf on CentOS 5, CentOS 6

Standard

This is a quick guide on how to install mod_rpaf on CentOS 5 and CentOS 6. (This guide can also be used to install mod_rpaf on RHEL and Fedora Core)

Changing whole server WHM charset from iso-8859-1 to utf-8

Standard

In httpd.conf add (or change if it’s already there):

AddDefaultCharset utf-8

or

Add this to your .htaccess:

IndexOptions +Charset=UTF-8

You can make changes to the /usr/local/lib/php.ini file via:
“WHM Home » Service Configuration » PHP Configuration Editor”

Adjusting the “default_charset” value via this option will update the php.ini file accordingly.
Remember to restart Apache after making the change to ensure it takes effect.

What are A, AAAA, MX, CNAME, SRV and TXT (SPF) records?

Standard

A record is the most common type of DNS resource record. It tells a DNS server what IP address to map a host name to. With an A record, you can set www.yourname.com to point a specific IP address.

AAAA is the IPv6 version of an A record. IPv6 addresses are normally written as eight groups of four hexadecimal digits, where each group is separated by a colon.

MX a mail exchanger is a server setup to accept mail for your domain name and either holds it for delivering to your users or passes it to another mail server. To receive internet mail, your mail server should be SMTP compliant and run on port 25. For UNIX variants, two popular servers are qmail and sendmail. The MX record tells other mail servers where mail for your domain should go. The record should point to an A record. MX records have what are called “Preference Settings.” Preference settings tell other mail servers which server to try to deliver mail to first. The MX record with the lowest preference setting is the first server that is tried. When the primary server is not available, mail deliveries will go to the next lowest preference MX record. Higher preference mail servers should be set up to forward received mail to the lowest preference MX record.

CNAME record is a domain alias, and points a host name to another host name. Our interface automatically chooses whether a record is a CNAME or an A record based on the type of data you supply. If you type in an IP, it’s an A record. If you type in another host name (www.cnn.com), the record is set as a CNAME.

SRV refers to service record. It is a category of data in the Internet Domain Name System specifying information on available services. It is defined in RFC 2782. SRV records must point to the canonical name of the host. Aliases or CNAMEs cannot be used as valid targets.

SPF (Sender Policy Framework) is an e-mail authentication system that verifies that the message came from an authorized mail server. SPF is designed to detect messages from spammers and phishers who falsify the sender’s IP address in the e-mail header. SPF is an extension to the SMTP mail protocol.

The DNS system identifies the IP address of a receiving mail server with a line of text in the DNS database known as an MX record. DNS also supports a “reverse MX” record, which identifies the sending mail server and is used by SPF. When an e-mail message is received, the mail server checks the SPF record in the DNS to see if it matches the actual IP address of the message. If it does, the e-mail is considered valid.

How to create SSH Proxy Tunnel with PuTTY

Standard

Configuring PuTTY

  1. Fire up the client and enter the hostname and port
  2. Type in a title under Saved Sessions and press Save
  3. On the left side, go to Connection->SSH->Tunnels
  4. In Source Port enter 8080 (this can be configured to be whatever you want, just remember it)
  5. Choose the Dynamic radio button under Destination
  6. Press Add, you should then see D8080 in the box above
  7. Go back to Session on the left side and then press Save to save the changes

SOCKS Proxy

To utilize the tunnel to its full benefit, you need to set up a SOCKS proxy in your browser. Will describe how to use the Proxifier. It works for all Windows applications.

  1. Download Proxifier.
  2. Go to the Profile -> Proxy Servers
  3. Click Add…
  4. Enter localhost in the Address box
  5. Enter 8080 in the Port box
  6. Check SOCKS Proxy and make sure the SOCKS v5 radio is checked
  7. Press Ok to save

enjoy it… ;)

How to restore MySQL Database via SSH/Telnet

Standard

Open your SSH/Telnet client and log into your website. The command line prompt you will see will vary by OS. For most hosting companies, this will bring you into the FTP root folder.

How to restore a cPanel Full backup from another server

Standard

If you don’t have a complete cPanle backup and have the Home Directory contents only, then I suggest you the following step,
1) Create New Account in WHM
2) Upload the Home Dir backup file (ZIP or TAR or GZ) to the corresponding accounts home path
3) Login into SSH, browse to the corresponding account’s home path and extract it using the tar command (only if the file is too big) else if the backup file is small you can extract it within the cPanel’s file manager itself.

If you can get Complete cPanel Backup File:
1) In the source cPanel goto Backups Section > Generate a Full Backup. Make the full backup file to be uploaded into some other site’s public path
2) Now SSH into your VPS’s root path
3) Create a directory called home2 in the root path and browse inside it
4) Now get the complete backup file using wget command
5) Once the file is downloaded, you can now login into the WHM as root and in the Left sidebar choose Complete Restore/cpmove restore
6) It will scans and displays the file you uploaded into the home2 folder
7) Now enter the cPanel’s username ( can be found in the file itself ) and click restore.

How to manipulate files in Linux

Standard

Make a Directory:

$ mkdir dirname
$ mkdir dirname1 dirname2
$ mkdir -p dir1/dir2/dir3

Copy Files:

$ cp file file2

You can also copy multiple files into one directory with a single command:

$ cp file1 file2 file3 dir1

Moving or Renaming Files:

$ mv file file2

To move the file into another directory:

$ mv file dir1

If you want to rename the file to file2 and move it into another directory, you probably already figured out the command:

$ mv file dir1/file2

Deleting Files and Directories:

$ rm file

You can also delete more files at once:

$ rm file1 file2