cleaning up...

getting grip of reality after moving is not easy in some situations.

when everything is still fresh, and on the other hand - so well known :) you know obviously that stopgaps tend to last for years after they were put “just for a moment”?

my december cleaning started with true horror of moving my mails erver from FreeBSD 9-STABLE (just EoLed) to 11-STABLE. traditional make buildworld; make kernel KERNCONF=server; mergemaster -FiU; make installworld; reboot didn’t work, but (WTF?!) the same sources were able to give me working build when i did make buildworld buildkernel; make installkernel and so on. for some reason, with the first sequence - cam.c dropped multiple warnings treated as error. and build failed.

second change was refreshing of certificates, because (StartCom was totally compromised). choosing right port was not easy, as it seems FreeBSD has like five different ones, but each requiring hundreds of dependencies. so i settled with certbot - supported by EFF. so, stopping nginx services, getting the certs and starting nginx is pretty simple:

# pkg install py27-certbot
 ! of course, they're going to change the name tomorrow...
# service nginx stop
 ! we have to stop nginx to replace certs
#certbot certonly --standalone -d
 ! it needs to be available from the internet and you can chain more than one:
 ! -d [second] -d [third] etc

of course you’ll need to set rescue e-mail, accept policy and then have fun with new certificates.

they are put by default in special dir:


so the only major thing to do is modify nginx cert configuration:

ssl on;
    ssl_certificate /usr/local/etc/letsencrypt/live/;
    ssl_certificate_key /usr/local/etc/letsencrypt/live/;

    ssl_prefer_server_ciphers on;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_session_cache shared:SSL:10m;

now you can start nginx again:

service nginx start

…and it’s much better now. next thing you can do is reconfigure mail server certs, and then of course automate it.