-
Notifications
You must be signed in to change notification settings - Fork 379
Setup Local SSL
ucan-lab edited this page Feb 28, 2022
·
9 revisions
-
https://github.com/FiloSottile/mkcert
- Create a local SSL certificate tool
-
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
- Network Security Services
- Required to enable SSL on localhost in Firefox
$ brew install mkcert nss
$ mkcert -install
-
chrome://flags/#allow-insecure-localhost
-
DISABLED
=>ENABLED
-
$ mkcert -cert-file ./infra/docker/nginx/localhost.pem -key-file ./infra/docker/nginx/localhost-key.pem localhost
services:
web:
ports:
- 443:443
server {
# listen 80;
listen 443 ssl;
server_name localhost;
ssl_certificate /etc/nginx/conf.d/localhost.pem;
ssl_certificate_key /etc/nginx/conf.d/localhost-key.pem;
# ...
}
Reference: http://nginx.org/en/docs/http/configuring_https_servers.html
COPY ./*.pem /etc/nginx/conf.d/
$ docker compose build web
$ docker compose down
$ docker compose up -d