Enable SSL in Haproxy Docker Container

I have a haproxy container running on port 80. This container is started with command docker run -d -p 80:80 –name haproxy1 -v /home/ubuntu/haproxy:/usr/local/etc/haproxy:ro haproxy:1.7 This haproxy used following configuration file /home/ubuntu/haproxy/haproxy.cfg global defaults frontend sok-front-end bind *:80 mode http default_backend sok-front-end backend sok-front-end mode http balance roundrobin server srv3 172.17.0.2:8000 To make this haproxy … 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 mkdir /usr/serverok/ vi /usr/serverok/mail_q_monitor.php Add following content.

Install SSL on Centova Cast

centovacast

Edit file vi /usr/local/centovacast/etc/cc-panel.conf Find listen 2199 default ssl; Add below listen 443 ssl; listen 80; Restart Centova Cast /usr/local/centovacast/centovacast restart At this point, you will be able to access Centova Cast on port 80 at http://YOUR_SERVER_IP/login/index.php To install LetsEncrypt Free SSL certificate, run /usr/local/centovacast/sbin/setssl letsencrypt YOUR-DOMAIN.EXTN Restart Centova Cast /usr/local/centovacast/centovacast restart Now you will … Read more

VestaCP Installer Compromised

VestaCP Free Hosting Control Panel

VestaCP Free Hosting control panel compromised again. Hackers where able to get access to VestaCP infrastcuture server, allowing them to modify installation script, so it sent root password of servers to hacker. Here is post from VestaCP on their forum I’m sorry about inactivity in this post from our side. It was a complex issue … 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 /usr/local/psa/admin/bin/php_handlers_control –list 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 plesk bin domain -u DOMAIN_NAME_HERE -php_handler_id plesk-php56-fpm Example

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

When installing ffmpeg, i get error CC libavcodec/libvorbisenc.o CC libavcodec/libx264.o libavcodec/libx264.c: In function ‘X264_frame’: libavcodec/libx264.c:282:9: error: ‘x264_bit_depth’ undeclared (first use in this function) if (x264_bit_depth > 8) ^ libavcodec/libx264.c:282:9: note: each undeclared identifier is reported only once for each function it appears in libavcodec/libx264.c: In function ‘X264_init_static’: libavcodec/libx264.c:892:9: error: ‘x264_bit_depth’ undeclared (first use in this … 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 zend_extension=opcache.so Now you may need to adjust some settings, in php.ini uncomment following, change values as needed. opcache.enable=1 opcache.enable_cli=1 opcache.memory_consumption=128 opcache.max_accelerated_files=10000 opcache.validate_timestamps=1 opcache.revalidate_freq=10 Verify it with [root@vps154294 php]# php -m | grep Zend Zend OPcache [Zend Modules] Zend OPcache [root@vps154294 … Read more

Install Redis PHP Module from source

To install Redis PHP module from source, run cd /usr/local/src git clone https://github.com/phpredis/phpredis.git cd /usr/local/src/phpredis /usr/serverok/php-7.1.12/bin/phpize ./configure –with-php-config=/usr/serverok/php-7.1.12/bin/php-config make && make install Once installed, edit your php.ini file, add following below extension_dir line extension=redis.so Verify redis is installed with php -m [root@vps154294 ~]# /usr/serverok/php-7.1.12/bin/php -m | grep redis redis [root@vps154294 ~]# Now restart web server … Read more