Section en-appache

Install PHP 7.1 with the Ondřej/php PPA

Written by on 01/03/2019
Category:   PHP, Apache
Tags:  
Unfortunately, I can't process the query as-is, since the placeholder `sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php7.1 sudo apt-get install php7.1-cli \ php7.1-common \ php7.1-json \ php7.1-opcache \ php7.1-mysql \ php7.1-mbstring \ php7.1-mcrypt \ php7.1-zip php7.1-fpm sudo a2dismod php7.2 sudo a2enmod php7.1 sudo service apache2 restartPuis configurer la version activesudo update-alternatives --set php /usr/bin/php7. ` does not contain any ...

Install PHPMyAdmin with Varnish

Written by on 07/10/2018
Category:   Linux, Apache
Tags:  
Simply expand the configuration of varnish: /etc/varnish/default.vclAnd add a directive to exclude the domain: in the sub vcl_recv routine add: if (req.http.Host == “phpmyadmin.p1-caue.partitech.com”) { return (pass); } If phpmyadmin is installed in a subdirectory of a vhost: if (req.url ~ “^/pma”) { return (pass); }If there is a problem with cookie creation, you need to add the following directive in the sub vcl_fetch directive: if (req.http.Host == “phpmyadmin....

Running php7 and php5.6 on Ubuntu 16.04 LTS

Written by on 14/06/2016
Category:   Linux, Ubuntu 16.04 LTS, Apache
Tags:  
You have undoubtedly noticed, PHP7 is installed by default on Ubuntu 16.04 LTS.This can be problematic if you have an old WordPress project that uses the php mysql extension, which is no longer available under php7.The solution is to install an apache 2 configuration for both php 5.6 and php 7, and to enable one or the other as needed.We start by installing PHP 5.6 sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbs...

Apache: Setting Up a Dedicated PHP Configuration per Vhost

Written by on 02/12/2015
Category:   Apache
Tags:   php.ini, php, bash, Apache, ubuntu, linux
This installation was tested on Ubuntu 15.01 but could be used for a debian production server. SuPhp has not been maintained for a few years now, so it is no longer in the repositories of recent distributions, and it has become difficult to compile it on a 4.x kernel (which is my case, since my transition to Ubuntu 15.10). Note: the package is still available on Ubuntu 14.01LTS. 1 – Installation of base packages. sudo apt-get install build-essential fakeroot dh-make debconf e...

Ubuntu: Install suPhp

Written by on 29/10/2014
Tags:  
This installation has been tested on Ubuntu 14.04LTS but could also be used for a Debian production server.Installation of Basic Packagessudo apt-get install \ build-essential \ fakeroot dh-make \ debconf execstack \ dh-modaliases \ xserver-xorg-dev \ automake \ autoconf \ libaprutil1 \ libaprutil1-dev \ libsvn-dev \ wx2.8-headers \ libwxgtk2.8-dev \ libxml2-dev \ libpcre3-dev \ libbz2-dev \ libcurl4-openssl-dev \ libjpeg-dev \ libpng12-dev \ libxpm-dev \ libfreetype6-dev ...

Apache: PHP Directives in the .htaccess File

Written by on 15/05/2014
Category:   Apache
Tags:   .htaccess, Apache
Here is a non-exhaustive list of PHP directives that can be added to the .htaccess file: php_flag display_errors Off error_log = /path/filename php_value date.timezone 'Region/Zone' php_value max_execution_time 30 php_flag register_globals Off php_flag magic_quotes_gpc Off php_value upload_max_filesize 200M php_value post_max_size 200M php_value memory_limit 20M php_value max_input_vars 100

Apache: Enable Compression

Written by on 15/05/2014
Category:   Apache
Tags:   .htaccess, Apache
To enable compression in Apache, you have two options; The first is to insert the directives into the .htaccess file, and the second is to place these directives directly in the declaration of your vhost. <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^i...