User standard dans le pool fpm
Utilisation du user vagrant dans le pool fpm et ainsi pouvoir utiliser simplement les cli php sans problème de permission
This commit is contained in:
parent
7db387c94b
commit
18fb98a157
2
lamp-trusty64-fpm/Vagrantfile
vendored
2
lamp-trusty64-fpm/Vagrantfile
vendored
@ -38,7 +38,7 @@ Vagrant.configure(2) do |config|
|
||||
# the path on the guest to mount the folder. And the optional third
|
||||
# argument is a set of non-required options.
|
||||
# config.vm.synced_folder "../data", "/vagrant_data"
|
||||
config.vm.synced_folder "../../", "/home/vhosts", owner: "www-data", group: "www-data"
|
||||
config.vm.synced_folder "../../", "/home/vhosts"
|
||||
|
||||
# Provider-specific configuration so you can fine-tune various
|
||||
# backing providers for Vagrant. These expose provider-specific options.
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
|
||||
VARGANTDEV=1
|
||||
DIR=/vagrant
|
||||
DIRDATA=$DIR/data
|
||||
@ -84,7 +86,11 @@ if [ ! -f /usr/bin/php5 ]; then
|
||||
sudo sed -i -e 's/upload_max_filesize = 2M/upload_max_filesize = 50M/g' /etc/php5/fpm/php.ini
|
||||
sudo sed -i -e 's/session.gc_maxlifetime = 1440/session.gc_maxlifetime = 86400/g' /etc/php5/fpm/php.ini
|
||||
sudo sed -i -e 's/;opcache.enable=0/opcache.enable=1/g' /etc/php5/fpm/php.ini
|
||||
sudo cp -f $DIRDATA/PHP/xdebug.ini /etc/php5/mods-available/xdebug.ini
|
||||
sudo cp -f $DIRDATA/PHP/xdebug.ini /etc/php5/mods-available/xdebug.ini
|
||||
# Pool user
|
||||
sudo sed -i -e 's/user = www-data/user = vagrant/g' /etc/php5/fpm/pool.d/www.conf
|
||||
sudo sed -i -e 's/group = www-data/group = vagrant/g' /etc/php5/fpm/pool.d/www.conf
|
||||
sudo sed -i -e 's/listen.group = www-data/listen.group = www-data/g' /etc/php5/fpm/pool.d/www.conf
|
||||
|
||||
# --- Browscap
|
||||
sudo cp -f $DIRDATA/PHP/php_browscap.ini /etc/php5/fpm/
|
||||
@ -101,7 +107,7 @@ if [ ! -f /usr/bin/php5 ]; then
|
||||
sudo cp $DIRDATA/ChartDirector/chartdir.ini /etc/php5/mods-available/
|
||||
sudo php5enmod chartdir
|
||||
fi
|
||||
|
||||
sudo service php5-fpm restart
|
||||
fi
|
||||
|
||||
# --- Composer
|
||||
@ -116,8 +122,8 @@ if [ ! -d "/home/vhosts/$PHPMYADMIN_DIR" ]; then
|
||||
wget -q "$PHPMYADMIN_URL/$PHPMYADMIN_VERSION/$PHPMYADMIN_DIR.tar.xz" -O "/home/vagrant/$PHPMYADMIN_DIR.tar.xz"
|
||||
if [ -f "/home/vagrant/$PHPMYADMIN_DIR.tar.xz" ]; then
|
||||
tar xJvf "/home/vagrant/$PHPMYADMIN_DIR.tar.xz" --directory /home/vhosts/
|
||||
mysql -hlocalhost -uroot -p$MYSQL_PASS < /home/vhosts/$PHPMYADMIN_DIR/sql/create_tables.sql
|
||||
mysql -hlocalhost -uroot -p$MYSQL_PASS < $DIRDATA/Apps/phpmyadmin.sql
|
||||
mysql -uroot -p$MYSQL_PASS < /home/vhosts/$PHPMYADMIN_DIR/sql/create_tables.sql
|
||||
mysql -uroot -p$MYSQL_PASS < $DIRDATA/Apps/phpmyadmin.sql
|
||||
sudo service mysql restart
|
||||
cp $DIRDATA/Apps/config.inc.php /home/vhosts/$PHPMYADMIN_DIR/
|
||||
chmod 0644 /home/vhosts/$PHPMYADMIN_DIR/config.inc.php
|
||||
@ -164,7 +170,7 @@ for f in *.conf; do
|
||||
continue
|
||||
fi
|
||||
if [ -f $f ]; then
|
||||
sudo cp -vf $f /etc/apache2/sites-available/;
|
||||
sudo cp -vf $f /etc/apache2/sites-available/
|
||||
VHOSTS+=" $f"
|
||||
fi
|
||||
done;
|
||||
|
Loading…
Reference in New Issue
Block a user