Category Archives: Nginx

force ssl on nginx

server {
    listen      80;
    server_name myhostname.com;
    rewrite     ^   https://$server_name$request_uri? permanent;
}

Generate dhparam

openssl dhparam -out /etc/nginx/ssl/dhparam.pem 4096