Usually websites(in our case ODK server) requires key and certificate pairs from the domain provider for SSL authentication. In case we dont have any secure ssl docmain generated how can we encrypt a website in a custom way?
Docker, Ubuntu, ODK Server
The customSSL for a website can be generated by providing just some basic information using OpenSSL. Openssl generates custom key certificate pair that we can use for encrypting any website.
Download and install OpenSSL and then execute the following commands for generating key certificate pair
'sudo apt install openssl',
'openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365',
The prompt asks for Country,Province,Company Name, Email Address etc and generates the key certificate pair in current directory.
Copy those files into files/local/customssl/ within the repository root. Update the contents of .env file as follows In .env file set the following content:
'DOMAIN YOUR_DOMAIN',
'SYSADMIN_EMAIL YOUR_EMAIL_ADDRESS',
'SSL_TYPE customssl',
'HTTP_PORT 80',
'HTTPS_PORT 443',
Yippee, that sets the contents for certificate validation properly, now the ODK server webpage is encrypted and can deployed under docker.