Skip to content

Instantly share code, notes, and snippets.

@Super-Chama
Last active July 11, 2024 10:48
Show Gist options
  • Save Super-Chama/00f18d24118434cc49e435eddc082850 to your computer and use it in GitHub Desktop.
Save Super-Chama/00f18d24118434cc49e435eddc082850 to your computer and use it in GitHub Desktop.
Enable trusted SSL for local dev

Setup mkcert for Ubuntu 20+

  1. Install certutil sudo apt install libnss3-tools
  2. Download and install mkcert (from prebuilt binaries)
curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
chmod +x mkcert-v*-linux-amd64
sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert

Generate certificate

  1. Goto to your dev enviornment nginx cert folder. replace {your-dev-env-path} with your actual path.

cd {your-dev-env-path}/config/nginx/cert

  1. Initiate mkcert, follow instructions given

mkcert -install

  1. Generate certificates for domains you desire

mkcert "*.test-web74rh.orangehrmdev.com" "*.test-web74.orangehrmdev.com"

  1. Replace existing certificates with generated certificates. (make backups)
  2. Restart docker-compose and your browsers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment