Skip to content

Instantly share code, notes, and snippets.

@j3tm0t0
Created December 4, 2012 10:52
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 j3tm0t0/4202625 to your computer and use it in GitHub Desktop.
Save j3tm0t0/4202625 to your computer and use it in GitHub Desktop.
generate config for each SSL site
#!/bin/sh
idx=`printf "%03d" $1`
ip=$[ $1 + 10 ]
cat <<EOF | tee ssl$idx.conf
#
# HTTPS server configuration
#
server {
listen 10.1.0.$ip:443 default ssl;
# server_name _;
ssl on;
ssl_certificate server$idx.crt;
ssl_certificate_key server.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
root html$idx;
index index.html index.htm;
}
}
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment