Wednesday, November 18, 2015

Debian 8 and Varnish 4 Problem

The Varnish service was starting OK but it wasn't using any of the parameters, set in /etc/default/varnish.

For example, set the listening port to be 80, but Varnish would always start with port 6081.

The Varnish service (/lib/systemd/system/varnish.service) wasn't using any parameter files - instead it was hard coded to start with the default values only.

The temporary fix is to edit the varnish.service file and manually configure the parameters to match your needs.

reference: https://www.varnish-cache.org/forum/topic/5206

Thursday, November 12, 2015

Disable MySQL Strict mode in Debian 8 permanently

All blogs say:

 for turning off strict mode you must add following line to /etc/mysql/my.cnf:

sql_mode=""

and restart the mysql server.

That was not working me.

I have found another setting file for mysql: /usr/my.cnf

and in this file exists sql_mode parameter too.

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

this line must be commented out too:

#sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

Don't forget to restart the mysql server.

Thursday, July 23, 2015

Checking SSL Certifcate on Plesk Mail Server


Run this command (mail.DOMAIN.de is the MX-Record):

SMTP:
openssl s_client -starttls smtp -crlf -connect mail.DOMAIN.de:25

POP3:
openssl s_client -starttls pop3 -crlf -connect mail.DOMAIN.de:110

IMAP:
openssl s_client -starttls imap -crlf -connect mail.DOMAIN.de:143


As result you can see your certificate if it installed correctly:

Certificate chain
0 s:/description=FmJdZEx3lsXPoIXv/C=DE/CN=mail.DOMAIN.de/emailAddress=hostmaster@DOMAIN.de
   i:/C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom Class 1 Primary Intermediate Server CA
1 s:/C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom Class 1 Primary Intermediate Server CA
   i:/C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom Certification Authority
---


How to downgrade Openssl on CentOS?



List the available versions by running this command:

yum --showduplicates list openssl


you should see these lines:

Installed package:
openssl.x86_641:1.0.1e42.el7.9

Available packages:
openssl.x86_64 - 1:1.0.1e-42.el7 - base
openssl.x86_64 - 1:1.0.1e-42.el7_1.5 - updates
openssl.x86_64 - 1:1.0.1e-42.el7.4 - updates
openssl.x86_64 - 1:1.0.1e-42.el7.6 - updates
openssl.x86_64 - 1:1.0.1e-42.el7.8 - updates
openssl.x86_64 - 1:1.0.1e-42.el7.9 - updates


then doing:

yum downgrade openssl-1.0.1e-42.el7_1.5

it will downgrade openssl to 7_1.5 version.

Friday, March 27, 2015

Rollback to previous package version after bad upgrade with Debian

This will show all the versions of the package in the cache:
apt-cache show [package name]

This will install an older version of the package
apt-get install [package name]=[version]