-
-
Save tomquas/25a4b5cf87b193380fc0dc762daf3c24 to your computer and use it in GitHub Desktop.
Revisions
-
disintegrator renamed this gist
Oct 30, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
disintegrator revised this gist
Oct 30, 2018 . No changes.There are no files selected for viewing
-
disintegrator created this gist
Oct 30, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ brew install caddy mkcert nss dnsmasq mkcert -install mkcert '*.app.test' '*.cdn.test' # rename the certs and move them under /usr/local/etc/caddy/certs cat <<EOF > /usr/local/etc/caddy/Caddyfile *.app.test:443, *.cdn.test:443 { tls /usr/local/etc/caddy/certs/dev.pem /usr/local/etc/caddy/certs/dev-key.pem gzip proxy / localhost:3000 { transparent } } EOF cat <<EOF >> /usr/local/etc/dnsmasq.conf port=53 address=/.test/127.0.0.1 EOF sudo echo "nameserver 127.0.0.1" > /etc/resolver/test sudo brew services start dnsmasq scutil --dns # dnsmasq setup is successful if you see an entry for test domain like this: # resolver #8 # domain : test # nameserver[0] : 127.0.0.1 # flags : Request A records, Request AAAA records # reach : 0x00030002 (Reachable,Local Address,Directly Reachable Address) sudo caddy -conf /usr/local/etc/caddy/Caddyfile # optional: configure launchd to have caddy run on startup