Enable SSL in Haproxy Docker Container

I have a haproxy container running on port 80. This container is started with command

This haproxy used following configuration file /home/ubuntu/haproxy/haproxy.cfg

To make this haproxy work with SSL, first create a ssl.pem file with your SSL certificate contents in following order

copy and paste all those certs into ssl.pem file inside […]

Read More…

PHP script to monitor exim mail queue

When you run exim mail server, it is good to keep an eye on number of emails in mail queue. here is a PHP script that will check number of emails in queue, if it exceed pre-set number, it will email you. Create file

Add following content.

In this case, if mails in […]

Read More…

Install SSL on Centova Cast

centovacast

Edit file

Find

Add below

Restart Centova Cast

At this point, you will be able to access Centova Cast on port 80 at

To install LetsEncrypt Free SSL certificate, run

Restart Centova Cast

Now you will be able to access Centova Cast using HTTPS. […]

Read More…

Change PHP version for a site in Plesk Command line

Plesk Change PHP version

To change PHP version for a site, first find available PHP handlers, this can be done with command

You need to find the id for the PHP handler. For PHP 5.6 fpm, it is “plesk-php56-fpm”. To change a sites PHP version to PHP 5.6, run

Example […]

Read More…

error: ‘x264_bit_depth’ undeclared (first use in this function)

When installing ffmpeg, i get error

This is due to incompatability with ffmpeg and x264. What you can do is try another version of x264. You will be able to download older version of x264 from ftp://ftp.videolan.org/pub/x264/snapshots On 2018-08-14, it failed with latest stable snapshot. So i tried 14 days old stable snapshot

[…]

Read More…

Enable Zend OPcache in PHP

Zend OPcache in phpinfo

To enable Zend OPCache in PHP, edit php.ini add following to end of the file

Now you may need to adjust some settings, in php.ini uncomment following, change values as needed.

Verify it with

Restart web server. If you using php-fpm or fcgi, you need to restart the process. phpinfo() will show […]

Read More…

Install Redis PHP Module from source

To install Redis PHP module from source, run

Once installed, edit your php.ini file, add following below extension_dir line

Verify redis is installed with php -m

Now restart web server

phpinfo() will show following […]

Read More…