Back to Recipes
vtalbot
2 recipes shared
phpiredis for php5
Install the dependencies of phpiredis, then install the phpiredis and enable it.
sudo apt-get update
sudo apt-get install libhiredis0.10 libhiredis-dev -y
git clone https://github.com/nrk/phpiredis.git
10 years ago
vtalbot
Enable HTTP2 on Nginx
If the version of Nginx is higher than 1.9.5, it enable the HTTP2 protocol for sites with ssl.
if [[ $(nginx -v 2>&1 | grep -E '[0-9]+\.[0-9]+(\.[0-9]+)?' -o) > 1.9.5 ]]; then
for I in `grep -l 'listen 443 ssl;' /etc/nginx/sites-available/*`; do
sed -i 's/listen 443 ssl;/listen 443 ssl http2;/g' $I
sed -i "s/ssl_protocols TLSv1 TLSv1.1 TLSv1.2;/ssl_protocols TLSv1 TLSv1.1 TLSv1.2;\\n ssl_ciphers 'kEECDH+ECDSA+AES128 kEECDH+ECDSA+AES256 kEECDH+AES128 kEECDH+AES256 kEDH+AES128 kEDH+AES256 DES-CBC3-SHA +SHA !aNULL !eNULL !LOW !kECDH !DSS !MD5 !EXP !PSK !SRP !CAMELLIA !SEED';/g" $I
10 years ago
vtalbot