Issuing the self-signed certificates for the domains

Follow these steps:

  1. Now, we'll issue the self-signed certificates for the banka.com and bankb.com domains. To do so, we'll be using the certutil and mkcert utilities.

To install certutil, run the following command:

$ sudo apt-get install -y libnss3-tools

To install mkcert, run the following commands:

mkdir mkcert
cd mkcert
wget https://github.com/FiloSottile/mkcert/releases/download/v1.1.2/mkcert-v1.1.2-linux-amd64
mv mkcert-v1.1.2-linux-amd64 mkcert
chmod +x mkcert

The preceding commands will create a directory called mkcert, download the binary from GitHub, and create an executable called mkcert for issuing self-signed certificates. Make sure you download the binary version for your OS. Since I'm using Ubuntu, I downloaded the Ubuntu version.

  1. Run the following command to set up a local certificate store:
 mkcert –install

Now, let's issue self-signed certificates for banka.com and bankb.com.

  1. Run the following command to issue a certificate for banka.com:
./mkcert banka.com

Check the directory to see if the certificate files are generated. The banka.com.pem and banka.com-key.pem files should have been generated in your mkcert directory.

  1. Repeat this for the bankb.com domain:
./mkcert bankb.com

We now have the self-signed SSL certificates for the banka.com and bankb.com domains. Now, let's set up the http server, which will accept and route all the incoming requests to the banka.com and bankb.com domains.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.247.196