Created
May 17, 2016 03:18
-
-
Save AlexWheeler/f412cd06497d0e8b2229990f0074a335 to your computer and use it in GitHub Desktop.
This file contains 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
# 1. Install nginx | |
brew install nginx | |
# 2. Generate self-signed key/crt | |
openssl req -x509 -nodes -days 365 -newkey rsa:1024 \ | |
-keyout /etc/ssl/private/myssl.key \ | |
-out /etc/ssl/certs/myssl.crt | |
# 3. Edit nginx config located at: /usr/local/etc/nginx/nginx.conf | |
server { | |
listen 443 ssl; | |
server_name localhost; | |
ssl_certificate /etc/ssl/certs/myssl.crt; | |
ssl_certificate_key /etc/ssl/private/myssl.key; | |
ssl_session_cache shared:SSL:1m; | |
ssl_session_timeout 5m; | |
ssl_ciphers HIGH:!aNULL:!MD5; | |
ssl_prefer_server_ciphers on; | |
location / { | |
# Or whatever port your server is running on | |
proxy_pass http://127.0.0.1:3000; | |
} | |
# 4. Navigate to https://localhost:443 and should forward request to proxy_pass url. Browser might complain that site isn't trusted | |
Just because using self-signed certs - fine for development |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment