By default mapping the certs to the domains is not necessary, BitNinja does this automatically, however in case the automatism that should gather the certs fail or get the wrong cert we have provided this workaround.
Since version 3.1.0, you can manually add each domain’s SSL cert’s location if necessary.
In this guide, we will walk you through the process of manually setting up cert mapping. You’ll need to locate the cert file and key file to get started.
You may also set up the location of chain files, but this step is optional. If you don’t have a chain file, you can simply skip this part.
If you have a combined certificate, you need to use the location of the combined certificate for both the certificate file and the key file.
Not every domain has a chain file. However if one of the domains has a chain file, it must be included in the mapping as chainFiles[<domain here>]= chain/file/location/ here.
Not every domain has a chain file. However if one of the domains has a chain file, it must be included in the mapping as chainFiles[<domain here>]= chain/file/location/ here.
- Open /etc/bitninja/SslTerminating/config.ini with your preferred text editor.
e.g.:nano /etc/bitninja/SslTerminating/config.ini
- Find the
[certMappings
] flag in the file
e.g.: in nano usectrl+w
then type [certMappings - Delete the semicolon (;) from the beginning of the certFiles[domain.com]=”/home/crt1″ and keyFiles[domain.com]=”/home/key1″ lines. (If you have a chain file, you’ll need to perform the same step there.
- Now you have to set up the domain name and path to the cert file and the key file
certFiles[example.domain.com]=”/path/to/the/cert”
keyFiles[example.domain.com]=”/path/to/the/key” - Save the changes and exit the text editor
e.g.: in nanoctrl+x
and then pressy
and then press enter - Issue the bitninjacli –syncconfigs command to synchronize the changes with the dashboard.
Restart BitNinja with the following command:service bitninja restart
Even if the cert and key files’ location are collected by the BitNinja ConfigParses module this configuration will take priority.
If you have followed the guide provided above, the configuration file should now resemble the following:[certMappings]
certFiles[example.domain.com]="/path/to/the/cert"
keyFiles[example.domain.com]="/path/to/the/key"
;chainFiles[domain.com]="/home/chain1"