Last active
November 2, 2017 10:46
-
-
Save lucymtc/e280d1d0f68a620117e0df69b789f66e to your computer and use it in GitHub Desktop.
Set up SSL on VVV (Mac)
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 characters
# From https://kellenmace.com/set-up-ssl-locally-on-vvv-vagrant-wordpress-site/ | |
cd ~/vagrant-local/config/nginx-config/sites | |
mkdir ssl | |
cd ssl | |
# Generate ssl key and certificate | |
openssl genrsa -out example.dev.key 2048 | |
openssl req -new -x509 -key example.dev.key -out example.dev.cert -days 3650 -subj /CN=example.dev | |
# Edit .conf file | |
cd .. | |
nano example.conf | |
# Edit at the bottom before server {....} closing curly brace. | |
ssl on; | |
ssl_certificate /srv/config/nginx-config/sites/ssl/example.dev.cert; | |
ssl_certificate_key /srv/config/nginx-config/sites/ssl/example.dev.key; | |
# `Ctrl + x` to exit and `y` to save changes | |
# Open Applications -> Utilities -> Keychain Access | |
# Drag and drop certificate file `config/nginx-config/sites/ssl/example.dev.cert` into the application | |
# Double click on it and change to "Always Trust" | |
vagrant provision | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment