From ce3d74cd724f75e962fe4468d2e08a91d91010b2 Mon Sep 17 00:00:00 2001
From: tsteur <thomas.steur@googlemail.com>
Date: Tue, 14 Aug 2012 21:02:59 +0000
Subject: [PATCH] refs #3314 nginx.piwik:8080 is now fully working with nginx
 and php-fpm. piwik installation works

git-svn-id: http://dev.piwik.org/svn/trunk@6759 59fd770c-687e-43c8-a1e3-f5a4ff64c105
---
 misc/deploy/puppet/init.pp                |  2 --
 misc/deploy/puppet/nodes.pp               | 14 +++++-----
 misc/deploy/puppet/php-piwik.pp           | 32 ++++++++++++++++++++++-
 misc/deploy/vagrant/precise64/Vagrantfile |  2 --
 4 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/misc/deploy/puppet/init.pp b/misc/deploy/puppet/init.pp
index af4368dee6..778e18676a 100644
--- a/misc/deploy/puppet/init.pp
+++ b/misc/deploy/puppet/init.pp
@@ -19,8 +19,6 @@ package {
         ensure => latest;
     'wget':
         ensure => latest;
-    'python-software-properties':
-        ensure => installed;
 }
 
 include git
diff --git a/misc/deploy/puppet/nodes.pp b/misc/deploy/puppet/nodes.pp
index dd67de272f..0f97bf569f 100644
--- a/misc/deploy/puppet/nodes.pp
+++ b/misc/deploy/puppet/nodes.pp
@@ -1,12 +1,14 @@
-host {
-    "piwik.local":
-        ip      => "127.0.0.1";
-} 
 
-$piwik_domain = 'piwik.local'
+$piwik_domain = 'nginx.piwik'
 $piwik_path   = '/var/www/piwik'
+$piwik_port   = 80
 $socket_path  = "${piwik_path}/tmp/fpm.socket"
 
+host {
+    "${piwik_domain}":
+        ip      => "127.0.0.1";
+} 
+
 user { $piwik_domain:
   ensure  => present,
   comment => $piwik_domain,
@@ -40,7 +42,7 @@ node default {
   nginx::resource::vhost { "${piwik_domain}":
     ensure   => present,
     www_root => $piwik_path,
-    listen_port => 8001,
+    listen_port => 8080,
     locations => $php_locations
   }
 }
diff --git a/misc/deploy/puppet/php-piwik.pp b/misc/deploy/puppet/php-piwik.pp
index 924274cefb..f69247dfba 100644
--- a/misc/deploy/puppet/php-piwik.pp
+++ b/misc/deploy/puppet/php-piwik.pp
@@ -1,4 +1,34 @@
 include php
 
 php::module { ['snmp', 'xdebug', 'mysql', 'gd', 'sqlite', 'memcache', 'mcrypt', 'imagick', 'geoip', 'uuid', 'recode', 'cgi']:
-}
\ No newline at end of file
+  notify => Class['php::fpm::service'],
+}
+
+file { "/etc/php5/conf.d/pdo.ini":
+  content => "extension=pdo.so",
+  notify => Class['php::fpm::service'],
+}
+
+file { "/etc/php5/conf.d/pdo_mysql.ini":
+  content => "extension=pdo_mysql.so",
+  notify => Class['php::fpm::service'],
+}
+
+file { "/etc/php5/conf.d/mysqli.ini":
+  content => "extension=mysqli.so",
+  notify => Class['php::fpm::service'],
+}
+
+# TODO replace above files with php::conf
+# php::conf { [ 'pdo' ]:
+#   content => 'extension=pdo.so',
+#   notify => Class['php::fpm::service'],
+# }
+# php::conf { [ 'pdo_mysql' ]:
+#   content => 'extension=pdo_mysql.so',
+#   notify => Class['php::fpm::service'],
+# }
+# php::conf { [ 'mysqli' ]:
+#   content => 'extension=mysqli.so',
+#   notify => Class['php::fpm::service'],
+# }
\ No newline at end of file
diff --git a/misc/deploy/vagrant/precise64/Vagrantfile b/misc/deploy/vagrant/precise64/Vagrantfile
index 9bc08576fd..c3c37ac03d 100644
--- a/misc/deploy/vagrant/precise64/Vagrantfile
+++ b/misc/deploy/vagrant/precise64/Vagrantfile
@@ -31,8 +31,6 @@ Vagrant::Config.run do |config|
   # Forward a port from the guest to the host, which allows for outside
   # computers to access the VM, whereas host only networking does not.
   # config.vm.forward_port 80, 8080
-  config.vm.forward_port 80, 8080
-  config.vm.forward_port 8000, 8001
 
   # Share an additional folder to the guest VM. The first argument is
   # an identifier, the second is the path on the guest to mount the
-- 
GitLab