Skip to content

Instantly share code, notes, and snippets.

@xdtianyu
Last active August 29, 2015 14:25
Show Gist options
  • Save xdtianyu/17f288abe4c1bcac6a1f to your computer and use it in GitHub Desktop.
Save xdtianyu/17f288abe4c1bcac6a1f to your computer and use it in GitHub Desktop.
server {
listen 80 default;
listen 443 default;
server_name _;
ssl_certificate certs/default.crt;
ssl_certificate_key certs/default.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
# return 301 $scheme://localhost$request_uri;
return 302 http://localhost$request_uri;
}
#!/bin/bash
openssl genrsa 1024 > default.key
chmod 400 default.key
openssl req -new -x509 -nodes -sha1 -days 36500 -key default.key >default.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment