From 73d3507aab1f2a92ff6b5f7e70cffa77bd95761d Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Mon, 29 Dec 2014 15:30:57 +0100 Subject: [PATCH] Backport from trusty --- lamp-precise64/bootstrap.sh | 15 +++++++-------- lamp-precise64/data/Apache/phpmyadmin | 7 ++++--- lamp-precise64/data/Apache/test | 1 + lamp-precise64/data/PHP/xdebug.ini | 6 ++++++ 4 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 lamp-precise64/data/PHP/xdebug.ini diff --git a/lamp-precise64/bootstrap.sh b/lamp-precise64/bootstrap.sh index d08fcdc..819797c 100644 --- a/lamp-precise64/bootstrap.sh +++ b/lamp-precise64/bootstrap.sh @@ -34,7 +34,7 @@ then sudo sed -i -e 's/bind-address[ \t]*= 127.0.0.1/bind-address = 0.0.0.0/g' /etc/mysql/my.cnf sudo sed -i -e 's/max_connections[ \t]*= 100/max_connections = 20/g' /etc/mysql/my.cnf sudo service mysql restart - mysql -uroot -p$MYSQL_PASS < /vagrant/data/Apps/phpmyadmin.sql + mysql -hlocalhost -uroot -p$MYSQL_PASS < /vagrant/data/Apps/phpmyadmin.sql sudo touch /etc/mysql/vagrant fi @@ -45,7 +45,7 @@ then if [ -f "/vagrant/data/Apps/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" ] then unzip "/vagrant/data/Apps/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" -d /home/vhosts/ - mysql -uroot -p$MYSQL_PASS < "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/examples/create_tables.sql" + mysql -hlocalhost -uroot -p$MYSQL_PASS < "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/examples/create_tables.sql" cp /vagrant/data/Apps/config.inc.php "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/" fi fi @@ -57,7 +57,7 @@ sudo sed -i -e 's/post_max_size = 8M/post_max_size = 50M/g' /etc/php5/apache2/ph sudo sed -i -e 's/upload_max_filesize = 2M/upload_max_filesize = 50M/g' /etc/php5/apache2/php.ini sudo sed -i -e 's/session.gc_maxlifetime = 1440/session.gc_maxlifetime = 86400/g' /etc/php5/apache2/php.ini sudo sed -i -e 's/;opcache.enable=0/opcache.enable=1/g' /etc/php5/apache2/php.ini -#sudo cp /vagrant/data/xdebug.ini /etc/php5/mods-available/xdebug.ini +sudo cp -f /vagrant/data/PHP/xdebug.ini /etc/php5/conf.d/xdebug.ini # Browscap sudo cp -f /vagrant/data/PHP/php_browscap.ini /etc/php5/apache2/ @@ -69,8 +69,7 @@ then sudo cp /vagrant/data/ChartDirector/lib/libchartdir.so /usr/lib/php5/20090626/ sudo cp /vagrant/data/ChartDirector/lib/phpchartdir530.dll /usr/lib/php5/20090626/ sudo cp /vagrant/data/ChartDirector/chartdir.lic /usr/lib/php5/20090626/ - sudo cp /vagrant/data/ChartDirector/chartdir.ini /etc/php5/mods-available/ - sudo php5enmod chartdir + sudo cp /vagrant/data/ChartDirector/chartdir.ini /etc/php5/conf.d/ fi # Configuration PHP / CLI @@ -78,7 +77,7 @@ sudo sed -i -e 's/short_open_tag = Off/short_open_tag = On/g' /etc/php5/cli/php. sudo sed -i -e 's/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php5/cli/php.ini # Configuration Apache -sudo cp -f /vagrant/data/Apache/httpd.conf /etc/apache2/conf-available/ +sudo cp -f /vagrant/data/Apache/httpd.conf /etc/apache2/ if [ ! -d /home/vhosts/apachelog ] then sudo mkdir /home/vhosts/apachelog @@ -104,12 +103,12 @@ for f in *; do DVHOSTS+=" $f"; done; sudo a2dissite $DVHOSTS # Copy Vhosts files -VHOSTS='000-default.conf' +VHOSTS='default' cd /vagrant/vhosts/ for f in *; do if [ -f $f ] then - sudo cp -f $f /etc/apache2/sites-available/; + sudo cp -f $f /etc/apache2/sites-available/ VHOSTS+=" $f" fi done; diff --git a/lamp-precise64/data/Apache/phpmyadmin b/lamp-precise64/data/Apache/phpmyadmin index dc7a7ea..615e214 100644 --- a/lamp-precise64/data/Apache/phpmyadmin +++ b/lamp-precise64/data/Apache/phpmyadmin @@ -4,9 +4,10 @@ UseCanonicalPhysicalPort On DocumentRoot /home/vhosts/phpmyadmin - AllowOverride all - Order allow,deny - allow from all + EnableSendfile Off + AllowOverride all + Order allow,deny + allow from all # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. diff --git a/lamp-precise64/data/Apache/test b/lamp-precise64/data/Apache/test index a06fe51..49a4545 100644 --- a/lamp-precise64/data/Apache/test +++ b/lamp-precise64/data/Apache/test @@ -4,6 +4,7 @@ UseCanonicalPhysicalPort On DocumentRoot /home/vhosts/test + EnableSendfile Off Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny diff --git a/lamp-precise64/data/PHP/xdebug.ini b/lamp-precise64/data/PHP/xdebug.ini new file mode 100644 index 0000000..64dcc08 --- /dev/null +++ b/lamp-precise64/data/PHP/xdebug.ini @@ -0,0 +1,6 @@ +zend_extension=/usr/lib/php5/20090626/xdebug.so + +[xdebug] +xdebug.remote_enable = 1 +xdebug.remote_port = 9000 +xdebug.remote_connect_back = 1 \ No newline at end of file