Skip to content

Instantly share code, notes, and snippets.

View blt's full-sized avatar

Brian L. Troutwine blt

View GitHub Profile
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
@blt
blt / vhost
Created August 30, 2011 17:48
server {
listen 80 default;
root /var/www/com/example/app/docdir;
server_name _;
index index.php;
location / {
try_files $uri $uri/ @kohana;
}
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
# curl -s localhost/app/lk
array (
'TEMP' => '/tmp',
'TMPDIR' => '/tmp',
'TMP' => '/tmp',
'HOSTNAME' => '',
'USER' => 'www-data',
'HOME' => '/var/www',
'FCGI_ROLE' => 'RESPONDER',
'QUERY_STRING' => '',
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
# apachectl -M
Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
alias_module (shared)
auth_basic_module (shared)

I'm trying to configure a hot-standby system. I have two machines:

  • db0 :: continuously archiving master
  • db1 :: continuously replicating slave

I have my system laid out somewhat differently than usual, mostly to accomadate the limitations of puppet. You'll find my postgresql.confs and pg_hba.conf here. The mapping of my disks to mount points are like so:

  • /dev/md0 --> /srv/pg/data
  • /dev/md1 --> /srv/pg/xlog
  • /dev/xvdn --> /srv/pg/archive
root@db1:~# tcpdump -i eth0 -s0 -X -n -vvv 'host 10.0.3.109 and port 5432'
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
20:37:03.930420 IP (tos 0x0, ttl 64, id 42241, offset 0, flags [DF], proto TCP (6), length 60)
10.0.3.46.48655 > 10.0.3.109.5432: Flags [S], cksum 0xa097 (correct), seq 4164585354, win 5840, options [mss 1460,sackOK,TS val 6693515 ecr 0,nop,wscale 7], length 0
0x0000: 4500 003c a501 4000 4006 7b20 0a00 032e E..<..@.@.{.....
0x0010: 0a00 036d be0f 1538 f83a 878a 0000 0000 ...m...8.:......
0x0020: a002 16d0 a097 0000 0204 05b4 0402 080a ................
0x0030: 0066 228b 0000 0000 0103 0307 .f".........
20:37:03.932165 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
10.0.3.109.5432 > 10.0.3.46.48655: Flags [S.], cksum 0x106a (correct), seq 4168776072, ack 4164585355, win 5792, options [mss 1460,sackOK,TS val 6692323 ecr 6693515,nop,wscale 7], length 0
$ ssh -v -i /home/blt/.ssh/carepilot/admin root@50.56.87.110
OpenSSH_5.5p1 Debian-6, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /home/blt/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 50.56.87.110 [50.56.87.110] port 22.
debug1: Connection established.
debug1: identity file /home/blt/.ssh/carepilot/admin type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-4096
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-4096
This is what I have in my .ssh/config:
Host review.carepilot.com
user troutwine
Port 29418
IdentityFile ~/.ssh/carepilot_review
It's possible that you're hitting the wrong port; git is fussy about ssh. Can you add that entry--changed for your environment--and try again?