Useful snippets

SSH login via key file

create key pair and download the files (/.ssh)
ssh-keygen -t rsa -b 2048
add private key to authorized keys /.ssh/authorized_key
cat key.pub >> /.ssh/authorized_keys
login from local machine
ssh user@host.com -i /.ssh/keyfile

phpMyAdmin disable root login

$cfg['Servers'][$i]['auth_type'] = ‘cookie’; 
$cfg['Servers'][$i]['AllowRoot'] = FALSE;

Create SSL certificate signing request (csr)

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

Point DNS to new server but fetch content from old server via apache mod_proxy

ProxyPass / http://oldserver.example.com/
ProxyPassReverse / http://oldserver.example.com/
ProxyPassReverseCookieDomain oldserver.example.com www.example.com
ProxyPreserveHost On