Skip to content

How to enable HTTPS in Silgy

Jurek Muszyński edited this page Jun 3, 2020 · 14 revisions

1. Install OpenSSL

sudo yum install openssl-devel

2. Add OpenSSL libraries to compilation script

Add -lssl -lcrypto, so m would look like this:

#!/bin/sh

echo Making silgy_app...

g++ silgy_app.cpp \
../lib/silgy_eng.c ../lib/silgy_lib.c ../lib/silgy_usr.c \
-I. -I../lib \
-lssl -lcrypto \
-lrt \
-s -O3 \
-o ../bin/silgy_app

3. Update silgy_app.h

#define HTTPS

4. Get a certificate and the key pair

Let's Encrypt is a good place to get one for free. Their certs are accepted by all popular browsers.

5. Update configuration

Set certFile, keyFile and optionally certChainFile in $SILGYDIR/bin/silgy.conf:

certFile=/etc/letsencrypt/live/example.com/fullchain.pem
certChainFile=/etc/letsencrypt/live/example.com/chain.pem
keyFile=/etc/letsencrypt/live/example.com/privkey.pem
Clone this wiki locally