diff --git a/lamp-trusty64-fpm/bootstrap.sh b/lamp-trusty64-fpm/bootstrap.sh
index a5a301f..f9c72b4 100644
--- a/lamp-trusty64-fpm/bootstrap.sh
+++ b/lamp-trusty64-fpm/bootstrap.sh
@@ -5,7 +5,7 @@ DIR=/vagrant
DIRDATA=$DIR/data
MYSQL_PASS=scores
MARIADB_VERSION="10.1"
-PHPMYADMIN_VERSION="4.6.1"
+PHPMYADMIN_VERSION="4.6.3"
# --- Add a file action.upgrade to perfom a system upgrade
if [ -f $DIR/action.upgrade ]
@@ -59,15 +59,19 @@ fi
# --- PHP
if [ ! -f /usr/bin/php5 ]
then
-
+ # Get apache2.4 from backports
+ sudo cp -f $DIRDATA/apt/preferences /etc/apt/preferences
+
+ # Install
sudo apt-get update
- sudo apt-get -y install htop unzip apache2 libapache2-mod-fastcgi php5-fpm php5-cli php5-apcu php5-curl php5-xmlrpc php5-xsl php5-mysqlnd
+ sudo apt-get -y install htop unzip apache2 php5-fpm php5-cli php5-apcu php5-curl php5-xmlrpc php5-xsl php5-mysqlnd
if [ $VARGANTDEV -eq 1 ]
then
sudo apt-get -y install php5-xdebug
fi
- sudo a2enmod autoindex deflate expires headers rewrite actions
- sudo cp -f $DIRDATA/Apache/fastcgi.conf /etc/apache2/mods-available/fastcgi.conf
+ sudo a2enmod autoindex deflate expires headers rewrite actions proxy proxy_fcgi
+ sudo cp -f $DIRDATA/Apache/phpfcgi.conf /etc/apache2/conf-available/phpfcgi.conf
+ sudo a2enconf phpfcgi
# --- Configuration PHP / CLI
if [ -f /etc/php5/cli/php.ini ]
@@ -127,7 +131,7 @@ then
mysql -hlocalhost -uroot -p$MYSQL_PASS < $DIRDATA/Apps/phpmyadmin.sql
sudo service mysql restart
cp $DIRDATA/Apps/config.inc.php /home/vhosts/$PHPMYADMIN_DIR/
- chmod 0444 /home/vhosts/$PHPMYADMIN_DIR/config.inc.php
+ chmod 0644 /home/vhosts/$PHPMYADMIN_DIR/config.inc.php
fi
fi
diff --git a/lamp-trusty64-fpm/data/Apache/fastcgi.conf b/lamp-trusty64-fpm/data/Apache/fastcgi.conf
deleted file mode 100644
index 26a269f..0000000
--- a/lamp-trusty64-fpm/data/Apache/fastcgi.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-
- AddType application/x-httpd-fastphp5 .php
- Action application/x-httpd-fastphp5 /php5-fcgi
- Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
- FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization -idle-timeout 310
-
- Require all granted
-
-
\ No newline at end of file
diff --git a/lamp-trusty64-fpm/data/Apache/phpfcgi.conf b/lamp-trusty64-fpm/data/Apache/phpfcgi.conf
new file mode 100644
index 0000000..0d61005
--- /dev/null
+++ b/lamp-trusty64-fpm/data/Apache/phpfcgi.conf
@@ -0,0 +1,18 @@
+
+ # Pick one of the following approaches
+ # Use the standard TCP socket
+ # SetHandler "proxy:fcgi://localhost/:9000"
+ # If your version of httpd is 2.4.9 or newer (or has the back-ported feature), you can use the unix domain socket
+ # SetHandler "proxy:unix:/path/to/app.sock|fcgi://localhost/"
+ SetHandler "proxy:unix:/var/run/php5-fpm.sock|fcgi://localhost/"
+
+
+# Définition d'une configuration de mandataire qui convient.
+# La partie qui est mise en correspondance avec la valeur de SetHandler est la partie qui suit
+# le "pipe". Si vous devez faire une distinction, "localhost" peut être changé en un nom de
+# serveur unique.
+#
+#
+
+# Add Authorization Header
+SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
\ No newline at end of file
diff --git a/lamp-trusty64-fpm/data/apt/preferences b/lamp-trusty64-fpm/data/apt/preferences
new file mode 100644
index 0000000..ecdfcd3
--- /dev/null
+++ b/lamp-trusty64-fpm/data/apt/preferences
@@ -0,0 +1,3 @@
+Package: *
+Pin: release a=trusty-backports
+Pin-Priority: 500
\ No newline at end of file