Created
December 4, 2012 10:52
-
-
Save j3tm0t0/4202625 to your computer and use it in GitHub Desktop.
generate config for each SSL site
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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