Fetching contributors…
Cannot retrieve contributors at this time
111 lines (68 sloc) 3.07 KB
-----AWS backup instance setup
Postfix setup:
sender_dependent_relayhost_maps = regexp:/etc/postfix/sender_dependent_relayhost
sender_canonical_maps = regexp:/etc/postfix/sender_canonical
static lookup:
postmap -q
query lookup:
postmap -q regexp:/etc/postfix/sender_canonical
Advanced mail mangling via postfix filter:
Mailjet wants valid <> in the From:
but can be "Some made up text <>"
Mail clients use Reply-To to populate the to: field when hitting reply button
Gmail shows "via" when Sender:, or another part of message headers indicates a via
A strategy:
(1) Use regex sender_canonical to rewrite address to "{Name} via webserver <>"
(2) Insert Reply-To: header with original From:
(3) relay everything through mailjet
Manual setup steps:
1. sudo vi ~/.ssh/config
User ubuntu
IdentityFile /Users/mrdavidlaing/.ssh/web-angle-EU-West1.pem
2. Attach a data volume at /data
mkdir /data
fdisk -l
mke2fs -N 4000000 -t ext4 /dev/xvdf
vi /etc/fstab
/dev/xvdf /data auto defaults,nobootwait,comment=cloudconfig 0 0
mount -all
df -h
8. Setup SSH tunnel (using blowfish encryption, which is slightly less secure but less CPU intensive)
ssh -f -c blowfish -L 10080: -L10081: -L13000: -L12000: -N
9. Fix phpmyAdmin
Ensure this isn't on a public port!
sudo vi /var/www/phpmyadmin/
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'QzEoS8z4UjN0dIQArowX';
10. Setup git www deploy
NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
include /data/www/vhosts/*/nginx/*.conf;
/etc/nginx/fastcgi_params seems to require the HTTPS line to be commented out
#fastcgi_param HTTPS $server_https;
In ubuntu 11.10, the php5-fpm config file is /etc/php5/fpm/php-fpm.conf (not main.conf)
When changing location of mysql data, also update
sudo vi /etc/apparmor.d/usr.sbin.mysqld
/data/mysql/ r,
/data/mysql/** rwk,
/var/lib/mysql/ r,
/var/lib/mysql/** rwk,
Make sure that /data/mysql is chowned mysql:mysql
make sure that /data/mysql contains everything from /var/lib/mysql