$ mkdir ~/ssl
$ cd ~/ssl
$ openssl genrsa -out localhost.key 2048
$ openssl req -new -x509 -key localhost.key -out localhost.crt -days 3650 -subj /CN=localhost
$ sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain localhost.crt
$ brew install nginx
$ cp ~/ssl/localhost.crt /opt/boxen/homebrew/etc/nginx/cert.pem
$ cp ~/ssl/localhost.key /opt/boxen/homebrew/etc/nginx/cert.key
$ sudo cp /opt/boxen/homebrew/Cellar/nginx/1.10.1/homebrew.mxcl.nginx.plist /Library/LaunchDaemons/
$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
Created
December 10, 2016 08:53
-
-
Save yalab/ec87889622af89ce261596931fccd7e7 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment