diff --git a/BARRACUDA.sh.txt b/BARRACUDA.sh.txt
index 7613a99..ed66793 100755
--- a/BARRACUDA.sh.txt
+++ b/BARRACUDA.sh.txt
@@ -2022,15 +2022,15 @@ sub_force_advanced_nginx_config () {
     fi
     if [ "$_PHP_FPM_VERSION" != "5.2" ] && [ -e "/opt/local/etc/php53-fpm.conf" ] ; then
       if [ "$_USE_STOCK" = "NO" ] ; then
-        sed -i "s/127.0.0.1:9000/127.0.0.1:9090/g" $_THIS_NGX_PATH/nginx_octopus_include.conf  &> /dev/null
+        sed -i "s/php52/php53/g" $_THIS_NGX_PATH/nginx_octopus_include.conf  &> /dev/null
       else
-        sed -i "s/127.0.0.1:9000/127.0.0.1:9090/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null
+        sed -i "s/php52/php53/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null
       fi
     else
       if [ "$_USE_STOCK" = "NO" ] ; then
-        sed -i "s/127.0.0.1:9090/127.0.0.1:9000/g" $_THIS_NGX_PATH/nginx_octopus_include.conf  &> /dev/null
+        sed -i "s/php53/php52/g" $_THIS_NGX_PATH/nginx_octopus_include.conf  &> /dev/null
       else
-        sed -i "s/127.0.0.1:9090/127.0.0.1:9000/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null
+        sed -i "s/php53/php52/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null
       fi
     fi
   fi
diff --git a/OCTOPUS.sh.txt b/OCTOPUS.sh.txt
index b1fbdde..19d0f4f 100755
--- a/OCTOPUS.sh.txt
+++ b/OCTOPUS.sh.txt
@@ -819,15 +819,15 @@ sub_force_advanced_nginx_config_main () {
     fi
     if [ "$_PHP_FPM_VERSION" != "5.2" ] && [ -e "/opt/local/etc/php53-fpm.conf" ] ; then
       if [ "$_USE_STOCK" = "NO" ] ; then
-        sed -i "s/127.0.0.1:9000/127.0.0.1:9090/g" $_THIS_NGX_PATH/nginx_octopus_include.conf  &> /dev/null
+        sed -i "s/php52/php53/g" $_THIS_NGX_PATH/nginx_octopus_include.conf  &> /dev/null
       else
-        sed -i "s/127.0.0.1:9000/127.0.0.1:9090/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null
+        sed -i "s/php52/php53/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null
       fi
     else
       if [ "$_USE_STOCK" = "NO" ] ; then
-        sed -i "s/127.0.0.1:9090/127.0.0.1:9000/g" $_THIS_NGX_PATH/nginx_octopus_include.conf  &> /dev/null
+        sed -i "s/php53/php52/g" $_THIS_NGX_PATH/nginx_octopus_include.conf  &> /dev/null
       else
-        sed -i "s/127.0.0.1:9090/127.0.0.1:9000/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null
+        sed -i "s/php53/php52/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null
       fi
     fi
   fi
diff --git a/aegir/conf/nginx.conf b/aegir/conf/nginx.conf
index 8f8b4dc..f5a70c9 100644
--- a/aegir/conf/nginx.conf
+++ b/aegir/conf/nginx.conf
@@ -8,6 +8,14 @@ events {
   multi_accept on;
 }
 
+upstream php52 {
+  server unix:/var/run/php52.sock;
+}
+
+upstream php53 {
+  server unix:/var/run/php53.sock;
+}
+
 http {
   default_type application/octet-stream;
   gzip on;
diff --git a/aegir/conf/nginx_compact_include.conf b/aegir/conf/nginx_compact_include.conf
index cb33a1e..1a18a0f 100644
--- a/aegir/conf/nginx_compact_include.conf
+++ b/aegir/conf/nginx_compact_include.conf
@@ -35,7 +35,7 @@ location ~ \.php$ {
   tcp_nopush off;
   keepalive_requests 0;
   try_files $uri =404;            ### check for existence of php file first
-  fastcgi_pass 127.0.0.1:9090;
+  fastcgi_pass php53;
 }
 
 ###
diff --git a/aegir/conf/nginx_legacy_include.conf b/aegir/conf/nginx_legacy_include.conf
index 5470827..5a35762 100644
--- a/aegir/conf/nginx_legacy_include.conf
+++ b/aegir/conf/nginx_legacy_include.conf
@@ -98,7 +98,7 @@ location = /cron.php {
   allow        127.0.0.1;
   deny         all;
   try_files    $uri =404;
-  fastcgi_pass 127.0.0.1:9000;
+  fastcgi_pass php52;
 }
 
 ###
@@ -112,7 +112,7 @@ location = /core/cron.php {
   allow        127.0.0.1;
   deny         all;
   try_files    $uri =404;
-  fastcgi_pass 127.0.0.1:9000;
+  fastcgi_pass php52;
 }
 
 ###
@@ -576,7 +576,7 @@ location ~* /(?:modules|libraries)/(?:contrib/)?(?:ad|tinybrowser|f?ckeditor|tin
     return 403;
   }
   try_files    $uri =404;
-  fastcgi_pass 127.0.0.1:9000;
+  fastcgi_pass php52;
 }
 
 ###
@@ -696,7 +696,7 @@ location ~ ^/(?<esi>esi/.*)$ {
   ###
   fastcgi_param QUERY_STRING q=$esi;
   fastcgi_param SCRIPT_FILENAME $document_root/index.php;
-  fastcgi_pass  127.0.0.1:9000;
+  fastcgi_pass  php52;
   ###
   ### Use Nginx cache for all visitors.
   ###
@@ -802,7 +802,7 @@ location = /index.php {
   tcp_nopush    off;
   keepalive_requests 0;
   try_files     $uri =404; ### check for existence of php file first
-  fastcgi_pass  127.0.0.1:9000;
+  fastcgi_pass  php52;
   ###
   ### Use Nginx cache for all visitors.
   ###
@@ -835,7 +835,7 @@ location ~* ^/(?:core/)?(?:boost_stats|update|authorize|rtoc|xmlrpc|js)\.php$ {
   keepalive_requests 0;
   access_log   off;
   try_files    $uri =404; ### check for existence of php file first
-  fastcgi_pass 127.0.0.1:9000;
+  fastcgi_pass php52;
 }
 
 ###
diff --git a/aegir/conf/nginx_modern_include.conf b/aegir/conf/nginx_modern_include.conf
index 91aa509..13ae284 100644
--- a/aegir/conf/nginx_modern_include.conf
+++ b/aegir/conf/nginx_modern_include.conf
@@ -124,7 +124,7 @@ location = /cron.php {
   allow        127.0.0.1;
   deny         all;
   try_files    $uri =404;
-  fastcgi_pass 127.0.0.1:9090;
+  fastcgi_pass php53;
 }
 
 ###
@@ -138,7 +138,7 @@ location = /core/cron.php {
   allow        127.0.0.1;
   deny         all;
   try_files    $uri =404;
-  fastcgi_pass 127.0.0.1:9090;
+  fastcgi_pass php53;
 }
 
 ###
@@ -617,7 +617,7 @@ location ~* /(?:modules|libraries)/(?:contrib/)?(?:ad|tinybrowser|f?ckeditor|tin
     return 403;
   }
   try_files    $uri =404;
-  fastcgi_pass 127.0.0.1:9090;
+  fastcgi_pass php53;
 }
 
 ###
@@ -737,7 +737,7 @@ location ~ ^/(?<esi>esi/.*)$ {
   ###
   fastcgi_param QUERY_STRING q=$esi;
   fastcgi_param SCRIPT_FILENAME $document_root/index.php;
-  fastcgi_pass  127.0.0.1:9090;
+  fastcgi_pass  php53;
   ###
   ### Use Nginx cache for all visitors.
   ###
@@ -843,7 +843,7 @@ location = /index.php {
   tcp_nopush    off;
   keepalive_requests 0;
   try_files     $uri =404; ### check for existence of php file first
-  fastcgi_pass  127.0.0.1:9090;
+  fastcgi_pass  php53;
   track_uploads uploads 60s; ### required for upload progress
   ###
   ### Use Nginx cache for all visitors.
@@ -877,7 +877,7 @@ location ~* ^/(?:core/)?(?:boost_stats|update|authorize|rtoc|xmlrpc|js)\.php$ {
   keepalive_requests 0;
   access_log   off;
   try_files    $uri =404; ### check for existence of php file first
-  fastcgi_pass 127.0.0.1:9090;
+  fastcgi_pass php53;
 }
 
 ###
diff --git a/aegir/conf/nginx_octopus_include.conf b/aegir/conf/nginx_octopus_include.conf
index 2443635..e1489ff 100644
--- a/aegir/conf/nginx_octopus_include.conf
+++ b/aegir/conf/nginx_octopus_include.conf
@@ -124,7 +124,7 @@ location = /cron.php {
   allow        127.0.0.1;
   deny         all;
   try_files    $uri =404;
-  fastcgi_pass 127.0.0.1:9000;
+  fastcgi_pass php52;
 }
 
 ###
@@ -138,7 +138,7 @@ location = /core/cron.php {
   allow        127.0.0.1;
   deny         all;
   try_files    $uri =404;
-  fastcgi_pass 127.0.0.1:9000;
+  fastcgi_pass php52;
 }
 
 ###
@@ -617,7 +617,7 @@ location ~* /(?:modules|libraries)/(?:contrib/)?(?:ad|tinybrowser|f?ckeditor|tin
     return 403;
   }
   try_files    $uri =404;
-  fastcgi_pass 127.0.0.1:9000;
+  fastcgi_pass php52;
 }
 
 ###
@@ -737,7 +737,7 @@ location ~ ^/(?<esi>esi/.*)$ {
   ###
   fastcgi_param QUERY_STRING q=$esi;
   fastcgi_param SCRIPT_FILENAME $document_root/index.php;
-  fastcgi_pass  127.0.0.1:9000;
+  fastcgi_pass  php52;
   ###
   ### Use Nginx cache for all visitors.
   ###
@@ -843,7 +843,7 @@ location = /index.php {
   tcp_nopush    off;
   keepalive_requests 0;
   try_files     $uri =404; ### check for existence of php file first
-  fastcgi_pass  127.0.0.1:9000;
+  fastcgi_pass  php52;
   track_uploads uploads 60s; ### required for upload progress
   ###
   ### Use Nginx cache for all visitors.
@@ -877,7 +877,7 @@ location ~* ^/(?:core/)?(?:boost_stats|update|authorize|rtoc|xmlrpc|js)\.php$ {
   keepalive_requests 0;
   access_log   off;
   try_files    $uri =404; ### check for existence of php file first
-  fastcgi_pass 127.0.0.1:9000;
+  fastcgi_pass php52;
 }
 
 ###
diff --git a/aegir/conf/php-fpm.conf b/aegir/conf/php-fpm.conf
index 93b0bf2..b7c1eb1 100644
--- a/aegir/conf/php-fpm.conf
+++ b/aegir/conf/php-fpm.conf
@@ -38,7 +38,7 @@
 
 			Address to accept fastcgi requests on.
 			Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket'
-			<value name="listen_address">127.0.0.1:9000</value>
+			<value name="listen_address">/var/run/php52.sock</value>
 
 			<value name="listen_options">
 
diff --git a/aegir/conf/php53-fpm.conf b/aegir/conf/php53-fpm.conf
index cb3fc5b..8459eef 100644
--- a/aegir/conf/php53-fpm.conf
+++ b/aegir/conf/php53-fpm.conf
@@ -140,7 +140,7 @@ group = www-data
 ;                            specific port;
 ;   '/path/to/unix/socket' - to listen on a unix socket.
 ; Note: This value is mandatory.
-listen = 127.0.0.1:9090
+listen = /var/run/php53.sock
 
 ; Set listen(2) backlog. A value of '-1' means unlimited.
 ; Default Value: 128 (-1 on FreeBSD and OpenBSD)
diff --git a/aegir/scripts/AegirSetupA.sh.txt b/aegir/scripts/AegirSetupA.sh.txt
index 4475572..2aec873 100644
--- a/aegir/scripts/AegirSetupA.sh.txt
+++ b/aegir/scripts/AegirSetupA.sh.txt
@@ -459,15 +459,15 @@ sub_force_advanced_nginx_config () {
   if [ -d "$_THIS_NGX_PATH" ] ; then
     if [ "$_PHP_FPM_VERSION" != "5.2" ] && [ -e "/opt/local/etc/php53-fpm.conf" ] ; then
       if [ "$_USE_STOCK" = "NO" ] ; then
-        sed -i "s/127.0.0.1:9000/127.0.0.1:9090/g" $_THIS_NGX_PATH/nginx_octopus_include.conf  &> /dev/null
+        sed -i "s/php52/php53/g" $_THIS_NGX_PATH/nginx_octopus_include.conf  &> /dev/null
       else
-        sed -i "s/127.0.0.1:9000/127.0.0.1:9090/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null
+        sed -i "s/php52/php53/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null
       fi
     else
       if [ "$_USE_STOCK" = "NO" ] ; then
-        sed -i "s/127.0.0.1:9090/127.0.0.1:9000/g" $_THIS_NGX_PATH/nginx_octopus_include.conf  &> /dev/null
+        sed -i "s/php53/php52/g" $_THIS_NGX_PATH/nginx_octopus_include.conf  &> /dev/null
       else
-        sed -i "s/127.0.0.1:9090/127.0.0.1:9000/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null
+        sed -i "s/php53/php52/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null
       fi
     fi
   fi
