Skip to content

Instantly share code, notes, and snippets.

@jjsty1e
Created June 7, 2017 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjsty1e/588ee89eb3b26f3aa3ad7810c97f8a24 to your computer and use it in GitHub Desktop.
Save jjsty1e/588ee89eb3b26f3aa3ad7810c97f8a24 to your computer and use it in GitHub Desktop.
nginx.conf
server {
listen 80;
server_name domain.com www.domain.com;
return 301 https://www.domain.com$request_uri;
}
server {
listen 443;
server_name www.domain.com domain.com;
root /alidata/www/geekerism;
index index.html;
if ($host ~* ^domain.com$) {
return 301 https://www.domain.com$request_uri;
}
ssl on;
ssl_certificate /path/to/pemFileName.pem;
ssl_certificate_key /path/tokeyFileName.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment