Tag Archives: Ngnix

setup nginx ssl configuration

Mozilla SSL Configuration Generator

https://mozilla.github.io/server-side-tls/ssl-config-generator/

 

Helpful documentation for understending and configuration SSL,TLS  on server’s side:

https://wiki.mozilla.org/Security/Server_Side_TLS

 

Some simple  Nginx config  for SSL:

server {

server_name hostname.com www.hostname.com;
listen 80;
return 301 https://hostname.com$request_uri;
}

server {
listen 443 ssl spdy;
server_name hostname.com;
resolver 127.0.0.1;
ssl_stapling on;
ssl on;
ssl_certificate /etc/pki/nginx/hostname.com.pem;
ssl_certificate_key /etc/pki/nginx/hostname.com.clean.key;
ssl_dhparam /etc/pki/nginx/dhparam.pem;
ssl_session_timeout 24h;
ssl_session_cache shared:SSL:2m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers kEECDH+AES128:kEECDH:kEDH:-3DES:kRSA+AES128:kEDH+3DES:DES-CBC3-SHA:!RC4:!aNULL:!eNULL:!MD5:!EXPORT:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security “max-age=31536000;”;
add_header Content-Security-Policy-Report-Only “default-src https:; script-src https: ‘unsafe-eval’ ‘unsafe-inline’; style-src https: ‘unsafe-inline’; img-src https: data:; font-src https: data:; report-uri /csp-report”;
}