- install required library
apt install libnss3-tools -y
- download, give permission & copy/move to bin folder:
wget https://github.com/FiloSottile/mkcert/releases/download/v1.1.2/mkcert-v1.1.2-linux-amd64
chmod +x mkcert-v1.1.2-linux-amd64
cp mkcert-v1.1.2-linux-amd64 /usr/local/bin/mkcert - Generate local CA
sudo mkcert -install
sudo mkcert -CAROOT - Generate Local SSL Certificates, for example my local domain is “yourdomain.net.local”
sudo mkcert yourdomain.net.local
- Then it will generate, like this
The certificate is at “./yourdomain.net.local.pem” and the key at “./yourdomain.net.local-key.pem”
- install on your web server,
NGINX, on .conf file :
server{
listen 80;
listen 443 ssl;
…………
ssl on;
ssl_certificate /path/to/yourdomain.net.local.pem;
ssl_certificate_key /path/to/yourdomain.net.local-key.pem;
………….
}APACHE, on .conf file:
…..
SSLCertificateFile /path/to/yourdomain.net.local.pem
SSLCertificateKeyFile /path/to/yourdomain.net.local-key.pem…..
- restart your apache/nginx service
Comments are closed.