Utilisation du module fcgi fournit avec apache à partir de la version
2.4.10
This commit is contained in:
parent
eaeffc2b10
commit
0157b2f88b
@ -5,7 +5,7 @@ DIR=/vagrant
|
|||||||
DIRDATA=$DIR/data
|
DIRDATA=$DIR/data
|
||||||
MYSQL_PASS=scores
|
MYSQL_PASS=scores
|
||||||
MARIADB_VERSION="10.1"
|
MARIADB_VERSION="10.1"
|
||||||
PHPMYADMIN_VERSION="4.6.1"
|
PHPMYADMIN_VERSION="4.6.3"
|
||||||
|
|
||||||
# --- Add a file action.upgrade to perfom a system upgrade
|
# --- Add a file action.upgrade to perfom a system upgrade
|
||||||
if [ -f $DIR/action.upgrade ]
|
if [ -f $DIR/action.upgrade ]
|
||||||
@ -59,15 +59,19 @@ fi
|
|||||||
# --- PHP
|
# --- PHP
|
||||||
if [ ! -f /usr/bin/php5 ]
|
if [ ! -f /usr/bin/php5 ]
|
||||||
then
|
then
|
||||||
|
# Get apache2.4 from backports
|
||||||
|
sudo cp -f $DIRDATA/apt/preferences /etc/apt/preferences
|
||||||
|
|
||||||
|
# Install
|
||||||
sudo apt-get update
|
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 ]
|
if [ $VARGANTDEV -eq 1 ]
|
||||||
then
|
then
|
||||||
sudo apt-get -y install php5-xdebug
|
sudo apt-get -y install php5-xdebug
|
||||||
fi
|
fi
|
||||||
sudo a2enmod autoindex deflate expires headers rewrite actions
|
sudo a2enmod autoindex deflate expires headers rewrite actions proxy proxy_fcgi
|
||||||
sudo cp -f $DIRDATA/Apache/fastcgi.conf /etc/apache2/mods-available/fastcgi.conf
|
sudo cp -f $DIRDATA/Apache/phpfcgi.conf /etc/apache2/conf-available/phpfcgi.conf
|
||||||
|
sudo a2enconf phpfcgi
|
||||||
|
|
||||||
# --- Configuration PHP / CLI
|
# --- Configuration PHP / CLI
|
||||||
if [ -f /etc/php5/cli/php.ini ]
|
if [ -f /etc/php5/cli/php.ini ]
|
||||||
@ -127,7 +131,7 @@ then
|
|||||||
mysql -hlocalhost -uroot -p$MYSQL_PASS < $DIRDATA/Apps/phpmyadmin.sql
|
mysql -hlocalhost -uroot -p$MYSQL_PASS < $DIRDATA/Apps/phpmyadmin.sql
|
||||||
sudo service mysql restart
|
sudo service mysql restart
|
||||||
cp $DIRDATA/Apps/config.inc.php /home/vhosts/$PHPMYADMIN_DIR/
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
<IfModule mod_fastcgi.c>
|
|
||||||
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
|
|
||||||
<Directory /usr/lib/cgi-bin>
|
|
||||||
Require all granted
|
|
||||||
</Directory>
|
|
||||||
</IfModule>
|
|
18
lamp-trusty64-fpm/data/Apache/phpfcgi.conf
Normal file
18
lamp-trusty64-fpm/data/Apache/phpfcgi.conf
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<FilesMatch "\.php$">
|
||||||
|
# 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/"
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#<Proxy "fcgi://localhost/" enablereuse=on max=10>
|
||||||
|
#</Proxy>
|
||||||
|
|
||||||
|
# Add Authorization Header
|
||||||
|
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
|
3
lamp-trusty64-fpm/data/apt/preferences
Normal file
3
lamp-trusty64-fpm/data/apt/preferences
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Package: *
|
||||||
|
Pin: release a=trusty-backports
|
||||||
|
Pin-Priority: 500
|
Loading…
Reference in New Issue
Block a user