# # Private server configuration # server { # server or port server_name private.meteorcat.com; listen 18080 ssl http2;
# Add index.php to the list if you are using PHP index index.html index.htm index.nginx-debian.html; # http support versions, ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # check server cipher ssl_prefer_server_ciphers on; # server cipher methods ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
# bidirectional check ssl_verify_client on; ssl_client_certificate /data/ssl/private.meteorcat.com.crt; # others...... root /var/www/html; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; } }
# cer exists if [ -f $CER_KEY_FILE ];then echo"$CER_KEY_FILE Exists" exit fi if [ -f $CER_OUT_FILE ];then echo"$CER_OUT_FILE Exists" exit fi if [ -f $CER_P12_FILE ];then echo"$CER_P12_FILE Exists" exit fi
# create cer openssl req -x509 -nodes -subj "/C=CA/ST=CA/L=CA/O=CA/OU=CA/CN=CA" -days 3650 -newkey rsa:4096 -keyout $CER_KEY_FILE -out $CER_OUT_FILE if [ $? -ne 0 ]; then echo"Failed by Create CER" exit 1 fi
# create p12 openssl pkcs12 -export -in$CER_OUT_FILE -inkey $CER_KEY_FILE -out $CER_P12_FILE if [ $? -ne 0 ]; then echo"Failed by Create P12" exit 1 fi